pub struct LockableStaticBuffer {
pub buffer: [u8; 10000],
pub locked: bool,
pub used_size: usize,
}
Fields§
§buffer: [u8; 10000]
§locked: bool
§used_size: usize
Implementations§
Source§impl LockableStaticBuffer
impl LockableStaticBuffer
pub const fn new() -> LockableStaticBuffer
pub const fn new_locked() -> LockableStaticBuffer
Sourcepub fn try_lock_with_copy_bytes<F>(&mut self, len: usize, copy_bytes: F) -> bool
pub fn try_lock_with_copy_bytes<F>(&mut self, len: usize, copy_bytes: F) -> bool
Returns true if locked successfully.
pub fn unlock(&mut self)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub const fn capacity() -> usize
pub fn remaining_capacity(&self) -> usize
pub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_slice_mut(&mut self) -> &mut [u8] ⓘ
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 Debug for LockableStaticBuffer
impl Debug for LockableStaticBuffer
Source§impl Default for LockableStaticBuffer
impl Default for LockableStaticBuffer
Source§fn default() -> LockableStaticBuffer
fn default() -> LockableStaticBuffer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LockableStaticBuffer
impl RefUnwindSafe for LockableStaticBuffer
impl Send for LockableStaticBuffer
impl Sync for LockableStaticBuffer
impl Unpin for LockableStaticBuffer
impl UnwindSafe for LockableStaticBuffer
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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