pub struct AeronHeader { /* private fields */ }Implementations§
Source§impl AeronHeader
impl AeronHeader
Sourcepub fn new_zeroed_on_heap() -> Self
pub fn new_zeroed_on_heap() -> Self
creates zeroed struct where the underlying c struct is on the heap
Sourcepub fn new_zeroed_on_stack() -> Self
pub fn new_zeroed_on_stack() -> Self
creates zeroed struct where the underlying c struct is on the stack (Use with care)
Sourcepub fn values(&self, values: &AeronHeaderValues) -> Result<i32, AeronCError>
pub fn values(&self, values: &AeronHeaderValues) -> Result<i32, AeronCError>
Sourcepub fn get_values(&self) -> Result<AeronHeaderValues, AeronCError>
pub fn get_values(&self) -> Result<AeronHeaderValues, AeronCError>
Get all of the field values from the header. This will do a memcpy into the supplied header_values_t pointer.
Sourcepub fn position(&self) -> i64
pub fn position(&self) -> i64
Get the current position to which the Image has advanced on reading this message.
§Return
the current position to which the Image has advanced on reading this message.
Sourcepub fn position_bits_to_shift(&self) -> usize
pub fn position_bits_to_shift(&self) -> usize
Get the number of times to left shift the term count to multiply by term length.
§Return
number of times to left shift the term count to multiply by term length.
Sourcepub fn next_term_offset(&self) -> i32
pub fn next_term_offset(&self) -> i32
Calculates the offset of the frame immediately after this one.
§Return
the offset of the next frame.
Sourcepub fn context(&self) -> *mut c_void
pub fn context(&self) -> *mut c_void
Get a pointer to the context associated with this message. Only valid during poll handling. Is normally a pointer to an Image instance.
§Return
a pointer to the context associated with this message.
pub fn get_inner(&self) -> *mut aeron_header_t
Sourcepub unsafe fn get_inner_mut(&self) -> &mut aeron_header_t
pub unsafe fn get_inner_mut(&self) -> &mut aeron_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.
pub fn get_inner_ref(&self) -> &aeron_header_t
Source§impl AeronHeader
impl AeronHeader
Sourcepub fn image(&self) -> Option<AeronImage>
pub fn image(&self) -> Option<AeronImage>
returns AeronImage, must be called in poll method
Sourcepub fn session_id(&self) -> Option<i32>
pub fn session_id(&self) -> Option<i32>
Session id of this fragment, or None if the underlying values lookup
failed. Collapses the get_values().frame().session_id() hop and never
panics on the fast path.
Sourcepub fn stream_id(&self) -> Option<i32>
pub fn stream_id(&self) -> Option<i32>
Stream id of this fragment, or None if the underlying values lookup
failed. Collapses the get_values().frame().stream_id() hop and never
panics on the fast path.
Sourcepub fn reserved_value(&self) -> Option<i64>
pub fn reserved_value(&self) -> Option<i64>
Reserved value of this fragment, or None if the underlying values
lookup failed. A sender can stamp a timestamp here (see
[AeronPublication::offer_timestamped]) so the receiver can measure
end-to-end latency.
Sourcepub fn term_id(&self) -> Option<i32>
pub fn term_id(&self) -> Option<i32>
Term id of this fragment, or None if the underlying values lookup
failed.
Sourcepub fn term_offset(&self) -> Option<i32>
pub fn term_offset(&self) -> Option<i32>
Term offset of this fragment, or None if the underlying values lookup
failed.
Trait Implementations§
Source§impl Clone for AeronHeader
impl Clone for AeronHeader
Source§fn clone(&self) -> AeronHeader
fn clone(&self) -> AeronHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more