pub struct Header { /* private fields */ }
Expand description
Represents the header of the data frame for accessing meta data fields.
Implementations§
Source§impl Header
impl Header
pub fn new(initial_term_id: i32, capacity: Index) -> Self
Sourcepub fn initial_term_id(&self) -> i32
pub fn initial_term_id(&self) -> i32
Get the initial term id this stream started at.
@return the initial term id this stream started at.
pub fn set_initial_term_id(&mut self, initial_term_id: i32)
Sourcepub fn offset(&self) -> Index
pub fn offset(&self) -> Index
The offset at which the frame begins.
@return offset at which the frame begins.
pub fn set_offset(&mut self, offset: Index)
Sourcepub fn buffer(&self) -> AtomicBuffer ⓘ
pub fn buffer(&self) -> AtomicBuffer ⓘ
The AtomicBuffer containing the header.
@return AtomicBuffer containing the header.
pub fn set_buffer(&mut self, buffer: AtomicBuffer)
Sourcepub fn frame_length(&self) -> Index
pub fn frame_length(&self) -> Index
The total length of the frame including the header.
@return the total length of the frame including the header.
Sourcepub fn session_id(&self) -> i32
pub fn session_id(&self) -> i32
The session ID to which the frame belongs.
@return the session ID to which the frame belongs.
Sourcepub fn stream_id(&self) -> i32
pub fn stream_id(&self) -> i32
The stream ID to which the frame belongs.
@return the stream ID to which the frame belongs.
Sourcepub fn term_id(&self) -> i32
pub fn term_id(&self) -> i32
The term ID to which the frame belongs.
@return the term ID to which the frame belongs.
Sourcepub fn term_offset(&self) -> Index
pub fn term_offset(&self) -> Index
The offset in the term at which the frame begins. This will be the same as {@link #offset()}
@return the offset in the term at which the frame begins.
Sourcepub fn frame_type(&self) -> u16
pub fn frame_type(&self) -> u16
The type of the the frame which should always be {@link DataFrameHeader::HDR_TYPE_DATA}
@return type of the the frame which should always be {@link DataFrameHeader::HDR_TYPE_DATA}
Sourcepub fn flags(&self) -> u8
pub fn flags(&self) -> u8
The flags for this frame. Valid flags are {@link DataFrameHeader::BEGIN_FLAG} and {@link DataFrameHeader::END_FLAG}. A convenience flag {@link DataFrameHeader::BEGIN_AND_END_FLAGS} can be used for both flags.
@return the flags for this frame.
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 reserved_value(&self) -> i64
pub fn reserved_value(&self) -> i64
Get the value stored in the reserve space at the end of a data frame header.
@return the value stored in the reserve space at the end of a data frame header.