pub struct StaticBufferRef<M>where
M: StaticVarApi,{ /* private fields */ }
Implementations§
Source§impl<M> StaticBufferRef<M>where
M: StaticVarApi,
impl<M> StaticBufferRef<M>where
M: StaticVarApi,
pub fn try_new_from_copy_bytes<F>( len: usize, copy_bytes: F, ) -> Option<StaticBufferRef<M>>
pub fn try_new(bytes: &[u8]) -> Option<StaticBufferRef<M>>
Source§impl<M> StaticBufferRef<M>where
M: StaticVarApi,
impl<M> StaticBufferRef<M>where
M: StaticVarApi,
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn capacity(&self) -> usize
pub fn remaining_capacity(&self) -> usize
pub fn with_buffer_contents<R, F>(&self, f: F) -> R
pub fn with_buffer_contents_mut<R, F>(&self, f: F) -> R
pub fn contents_eq(&self, bytes: &[u8]) -> bool
pub fn load_slice( &self, starting_position: usize, dest: &mut [u8], ) -> Result<(), InvalidSliceError>
pub fn try_extend_from_slice(&mut self, bytes: &[u8]) -> bool
pub fn try_extend_from_copy_bytes<F>( &mut self, len: usize, copy_bytes: F, ) -> bool
Trait Implementations§
Source§impl<M> Drop for StaticBufferRef<M>where
M: StaticVarApi,
impl<M> Drop for StaticBufferRef<M>where
M: StaticVarApi,
Auto Trait Implementations§
impl<M> Freeze for StaticBufferRef<M>
impl<M> RefUnwindSafe for StaticBufferRef<M>where
M: RefUnwindSafe,
impl<M> Send for StaticBufferRef<M>where
M: Send,
impl<M> Sync for StaticBufferRef<M>where
M: Sync,
impl<M> Unpin for StaticBufferRef<M>where
M: Unpin,
impl<M> UnwindSafe for StaticBufferRef<M>where
M: UnwindSafe,
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> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more