pub struct AeronCncConstants<S: ResourceStorage<aeron_cnc_constants_t> = CResource<aeron_cnc_constants_t>> { /* private fields */ }Implementations§
Source§impl AeronCncConstants<CResource<aeron_cnc_constants_t>>
impl AeronCncConstants<CResource<aeron_cnc_constants_t>>
pub fn new( cnc_version: i32, to_driver_buffer_length: i32, to_clients_buffer_length: i32, counter_metadata_buffer_length: i32, counter_values_buffer_length: i32, error_log_buffer_length: i32, client_liveness_timeout: i64, start_timestamp: i64, pid: i64, file_page_size: i32, ) -> Result<Self, AeronCError>
Sourcepub fn new_zeroed_on_heap() -> Self
pub fn new_zeroed_on_heap() -> Self
Creates zeroed native storage on the heap.
Sourcepub fn new_zeroed_on_stack() -> AeronCncConstants<Inline<aeron_cnc_constants_t>>
pub fn new_zeroed_on_stack() -> AeronCncConstants<Inline<aeron_cnc_constants_t>>
Creates zeroed native storage inline.
Source§impl<S: ResourceStorage<aeron_cnc_constants_t>> AeronCncConstants<S>
impl<S: ResourceStorage<aeron_cnc_constants_t>> AeronCncConstants<S>
pub fn cnc_version(&self) -> i32
pub fn to_driver_buffer_length(&self) -> i32
pub fn to_clients_buffer_length(&self) -> i32
pub fn counter_metadata_buffer_length(&self) -> i32
pub fn counter_values_buffer_length(&self) -> i32
pub fn error_log_buffer_length(&self) -> i32
pub fn client_liveness_timeout(&self) -> i64
pub fn start_timestamp(&self) -> i64
pub fn pid(&self) -> i64
pub fn file_page_size(&self) -> i32
pub fn get_inner(&self) -> *mut aeron_cnc_constants_t
Sourcepub unsafe fn get_inner_mut(&self) -> &mut aeron_cnc_constants_t
pub unsafe fn get_inner_mut(&self) -> &mut aeron_cnc_constants_t
Mutable access to the underlying C struct, minted from &self: nothing
prevents two live &mut at once, so the caller must ensure exclusive
access for the lifetime of the returned reference.
§Safety
No other reference (& or &mut) to the underlying struct may be
alive while the returned &mut is in use.
Sourcepub unsafe fn get_inner_ref(&self) -> &aeron_cnc_constants_t
pub unsafe fn get_inner_ref(&self) -> &aeron_cnc_constants_t
Borrow the native struct.
§Safety
No Rust or native call may mutate the struct while this reference is alive. Shared wrappers also require coordination with other threads.
Source§impl AeronCncConstants
impl AeronCncConstants
Sourcepub unsafe fn from_ptr(
ptr: *mut aeron_cnc_constants_t,
) -> AeronCncConstants<Borrowed<aeron_cnc_constants_t>>
pub unsafe fn from_ptr( ptr: *mut aeron_cnc_constants_t, ) -> AeronCncConstants<Borrowed<aeron_cnc_constants_t>>
Borrow a native pointer without taking ownership.
§Safety
The pointer must be non-null. It and its parents must remain live for every use. Calls must follow Aeron’s threading and aliasing rules.
Sourcepub fn from_native(
value: aeron_cnc_constants_t,
) -> AeronCncConstants<Inline<aeron_cnc_constants_t>>
pub fn from_native( value: aeron_cnc_constants_t, ) -> AeronCncConstants<Inline<aeron_cnc_constants_t>>
Copy a native struct into inline storage.
Source§impl<S: ResourceStorage<aeron_cnc_constants_t>> AeronCncConstants<S>
impl<S: ResourceStorage<aeron_cnc_constants_t>> AeronCncConstants<S>
Sourcepub fn clone_struct(
&self,
) -> AeronCncConstants<CResource<aeron_cnc_constants_t>>
pub fn clone_struct( &self, ) -> AeronCncConstants<CResource<aeron_cnc_constants_t>>
Copies the underlying struct into a new heap allocation
Only for plain data structs with no init or clean-up functions, so not for Aeron, AeronContext, AeronPublication or AeronSubscription
The struct holds no pointers, so the copy does not depend on the source
Trait Implementations§
Source§impl<S: Clone + ResourceStorage<aeron_cnc_constants_t>> Clone for AeronCncConstants<S>
impl<S: Clone + ResourceStorage<aeron_cnc_constants_t>> Clone for AeronCncConstants<S>
Source§fn clone(&self) -> AeronCncConstants<S>
fn clone(&self) -> AeronCncConstants<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more