pub struct AeronUri { /* private fields */ }
Implementations§
Source§impl AeronUri
impl AeronUri
pub fn new( mutable_uri: [c_char; 4096], type_: aeron_uri_type_t, params: aeron_uri_stct__bindgen_ty_1, ) -> Result<Self, AeronCError>
Sourcepub fn new_zeroed() -> Result<Self, AeronCError>
pub fn new_zeroed() -> Result<Self, AeronCError>
creates zeroed struct where the underlying c struct is on the heap
pub fn mutable_uri(&self) -> [c_char; 4096]
pub fn type_(&self) -> aeron_uri_type_t
pub fn params(&self) -> aeron_uri_stct__bindgen_ty_1
pub fn parse_params<AeronUriParseCallbackHandlerImpl: AeronUriParseCallbackCallback>( uri: *mut c_char, param_func: Option<&Handler<AeronUriParseCallbackHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn parse_params_once<AeronUriParseCallbackHandlerImpl: FnMut(&str, &str) -> c_int>(
uri: *mut c_char,
param_func: AeronUriParseCallbackHandlerImpl,
) -> Result<i32, AeronCError>
pub fn parse_params_once<AeronUriParseCallbackHandlerImpl: FnMut(&str, &str) -> c_int>( uri: *mut c_char, param_func: AeronUriParseCallbackHandlerImpl, ) -> Result<i32, AeronCError>
NOTE: aeron must not store this closure and instead use it immediately. If not you will get undefined behaviour, use with care
pub fn parse(&self, uri_length: usize, uri: &str) -> Result<i32, AeronCError>
pub fn close(&self)
pub fn multicast_ttl(&self) -> u8
pub fn sprint( &self, buffer: *mut c_char, buffer_len: usize, ) -> Result<i32, AeronCError>
pub fn sprint_as_string(&self, max_length: usize) -> Result<String, AeronCError>
Sourcepub fn sprint_into(
&self,
dst_truncate_to_capacity: &mut String,
) -> Result<i32, AeronCError>
pub fn sprint_into( &self, dst_truncate_to_capacity: &mut String, ) -> Result<i32, AeronCError>
NOTE: allocation friendly method, the string capacity must be set as it will truncate string to capacity it will never grow the string. So if you pass String::new() it will write 0 chars
pub fn parse_tag(tag_str: &str) -> i64
pub fn get_inner(&self) -> *mut aeron_uri_t
Source§impl AeronUri
impl AeronUri
Sourcepub fn clone_struct(&self) -> Self
pub fn clone_struct(&self) -> Self
Regular clone just increases the reference count of underlying count.
clone_struct
shallow copies the content of the underlying struct on heap.
NOTE: if the struct has references to other structs these will not be copied
Must be only used on structs which has no init/clean up methods. So its danagerous to use with Aeron/AeronContext/AeronPublication/AeronSubscription More intended for AeronArchiveRecordingDescriptor
Trait Implementations§
Source§impl Default for AeronUri
impl Default for AeronUri
This will create an instance where the struct is zeroed, use with care