#[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 PartialEq for Buffer
impl PartialEq for Buffer
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)