Struct Header

Source
pub struct Header { /* private fields */ }
Expand description

Represents the header of the data frame for accessing meta data fields.

Implementations§

Source§

impl Header

Source

pub fn new(initial_term_id: i32, capacity: Index) -> Self

Source

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.

Source

pub fn set_initial_term_id(&mut self, initial_term_id: i32)

Source

pub fn offset(&self) -> Index

The offset at which the frame begins.

@return offset at which the frame begins.

Source

pub fn set_offset(&mut self, offset: Index)

Source

pub fn buffer(&self) -> AtomicBuffer

The AtomicBuffer containing the header.

@return AtomicBuffer containing the header.

Source

pub fn set_buffer(&mut self, buffer: AtomicBuffer)

Source

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.

Source

pub fn session_id(&self) -> i32

The session ID to which the frame belongs.

@return the session ID to which the frame belongs.

Source

pub fn stream_id(&self) -> i32

The stream ID to which the frame belongs.

@return the stream ID to which the frame belongs.

Source

pub fn term_id(&self) -> i32

The term ID to which the frame belongs.

@return the term ID to which the frame belongs.

Source

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.

Source

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}

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl Clone for Header

Source§

fn clone(&self) -> Header

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for Header

§

impl RefUnwindSafe for Header

§

impl Send for Header

§

impl Sync for Header

§

impl Unpin for Header

§

impl UnwindSafe for Header

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V