pub struct AeronRttmHeader<S: ResourceStorage<aeron_rttm_header_t> = CResource<aeron_rttm_header_t>> { /* private fields */ }Implementations§
Source§impl AeronRttmHeader<CResource<aeron_rttm_header_t>>
impl AeronRttmHeader<CResource<aeron_rttm_header_t>>
pub fn new( frame_header: AeronFrameHeader<Inline<aeron_frame_header_t>>, session_id: i32, stream_id: i32, echo_timestamp: i64, reception_delta: i64, receiver_id: i64, ) -> 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() -> AeronRttmHeader<Inline<aeron_rttm_header_t>>
pub fn new_zeroed_on_stack() -> AeronRttmHeader<Inline<aeron_rttm_header_t>>
Creates zeroed native storage inline.
Source§impl<S: ResourceStorage<aeron_rttm_header_t>> AeronRttmHeader<S>
impl<S: ResourceStorage<aeron_rttm_header_t>> AeronRttmHeader<S>
pub fn frame_header(&self) -> AeronFrameHeader<Inline<aeron_frame_header_t>>
pub fn session_id(&self) -> i32
pub fn stream_id(&self) -> i32
pub fn echo_timestamp(&self) -> i64
pub fn reception_delta(&self) -> i64
pub fn receiver_id(&self) -> i64
pub fn get_inner(&self) -> *mut aeron_rttm_header_t
Sourcepub unsafe fn get_inner_mut(&self) -> &mut aeron_rttm_header_t
pub unsafe fn get_inner_mut(&self) -> &mut aeron_rttm_header_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_rttm_header_t
pub unsafe fn get_inner_ref(&self) -> &aeron_rttm_header_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 AeronRttmHeader
impl AeronRttmHeader
Sourcepub unsafe fn from_ptr(
ptr: *mut aeron_rttm_header_t,
) -> AeronRttmHeader<Borrowed<aeron_rttm_header_t>>
pub unsafe fn from_ptr( ptr: *mut aeron_rttm_header_t, ) -> AeronRttmHeader<Borrowed<aeron_rttm_header_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_rttm_header_t,
) -> AeronRttmHeader<Inline<aeron_rttm_header_t>>
pub fn from_native( value: aeron_rttm_header_t, ) -> AeronRttmHeader<Inline<aeron_rttm_header_t>>
Copy a native struct into inline storage.
Source§impl<S: ResourceStorage<aeron_rttm_header_t>> AeronRttmHeader<S>
impl<S: ResourceStorage<aeron_rttm_header_t>> AeronRttmHeader<S>
Sourcepub fn clone_struct(&self) -> AeronRttmHeader<CResource<aeron_rttm_header_t>>
pub fn clone_struct(&self) -> AeronRttmHeader<CResource<aeron_rttm_header_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_rttm_header_t>> Clone for AeronRttmHeader<S>
impl<S: Clone + ResourceStorage<aeron_rttm_header_t>> Clone for AeronRttmHeader<S>
Source§fn clone(&self) -> AeronRttmHeader<S>
fn clone(&self) -> AeronRttmHeader<S>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more