pub struct BufferClaim { /* private fields */ }
Expand description
Represents a claimed range in a buffer to be used for recording a message without copy semantics for later commit.
The claimed space is in {@link #buffer()} between {@link #offset()} and {@link #offset()} + {@link #length()}. When the buffer is filled with message data, use {@link #commit()} to make it available to subscribers.
Implementations§
Source§impl BufferClaim
impl BufferClaim
pub fn wrap(&mut self, buffer: *mut u8, length: Index)
pub fn wrap_with_offset( &mut self, buffer: &AtomicBuffer, offset: Index, length: Index, )
Sourcepub fn buffer(&self) -> AtomicBuffer ⓘ
pub fn buffer(&self) -> AtomicBuffer ⓘ
The buffer to be used.
@return the buffer to be used..
Sourcepub const fn offset(&self) -> Index
pub const fn offset(&self) -> Index
The offset in the buffer at which the claimed range begins.
@return offset in the buffer at which the range begins.
Sourcepub fn length(&self) -> Index
pub fn length(&self) -> Index
The length of the claimed range in the buffer.
@return length of the range in the buffer.
Sourcepub fn flags(&self) -> u8
pub fn flags(&self) -> u8
Get the value of the flags field.
@return the value of the header flags field.
Sourcepub fn set_flags(&mut self, flags: u8) -> &Self
pub fn set_flags(&mut self, flags: u8) -> &Self
Set the value of the header flags field.
@param flags value to be set in the header. @return this for a fluent API.
Sourcepub fn header_type(&self) -> u16
pub fn header_type(&self) -> u16
Get the value of the header type field.
@return the value of the header type field.
Sourcepub fn set_header_type(&mut self, header_type: u16) -> &Self
pub fn set_header_type(&mut self, header_type: u16) -> &Self
Set the value of the header type field.
@param type value to be set in the header. @return this for a fluent API.
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.
Sourcepub fn set_reserved_value(&mut self, value: i64) -> &Self
pub fn set_reserved_value(&mut self, value: i64) -> &Self
Write the provided value into the reserved space at the end of the data frame header.
@param value to be stored in the reserve space at the end of a data frame header. @return this for fluent API semantics.
Trait Implementations§
Source§impl Clone for BufferClaim
impl Clone for BufferClaim
Source§fn clone(&self) -> BufferClaim
fn clone(&self) -> BufferClaim
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more