#[repr(transparent)]pub struct Buffer(pub [u8; 16]);
Expand description
A Buffer represents a single contiguous memory segment
Tuple Fields§
§0: [u8; 16]
Implementations§
Source§impl<'a> Buffer
impl<'a> Buffer
pub fn new(offset: i64, length: i64) -> Self
Sourcepub fn offset(&self) -> i64
pub fn offset(&self) -> i64
The relative offset into the shared memory page where the bytes for this buffer starts
pub fn set_offset(&mut self, x: i64)
Sourcepub fn length(&self) -> i64
pub fn length(&self) -> i64
The absolute length (in bytes) of the memory buffer. The memory is found from offset (inclusive) to offset + length (non-inclusive). When building messages using the encapsulated IPC message, padding bytes may be written after a buffer, but such padding bytes do not need to be accounted for in the size here.
pub fn set_length(&mut self, x: i64)
Trait Implementations§
Source§impl<'a> Verifiable for Buffer
impl<'a> Verifiable for Buffer
Source§fn run_verifier(
v: &mut Verifier<'_, '_>,
pos: usize,
) -> Result<(), InvalidFlatbuffer>
fn run_verifier( v: &mut Verifier<'_, '_>, pos: usize, ) -> Result<(), InvalidFlatbuffer>
Runs the verifier for this type, assuming its at position
pos
in the verifier’s buffer.
Should not need to be called directly.impl Copy for Buffer
impl SimpleToVerifyInSlice for Buffer
impl StructuralPartialEq for Buffer
Auto Trait Implementations§
impl Freeze for Buffer
impl RefUnwindSafe for Buffer
impl Send for Buffer
impl Sync for Buffer
impl Unpin for Buffer
impl UnwindSafe for Buffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more