Struct lair_keystore::dependencies::sodoken::BufExtend
source · pub struct BufExtend(pub Arc<dyn AsBufExtend>);
Expand description
A concrete extendable buffer type that may or may not be mem_locked.
Tuple Fields§
§0: Arc<dyn AsBufExtend>
Implementations§
source§impl BufExtend
impl BufExtend
sourcepub fn new_no_lock(initial_capacity: usize) -> BufExtend
pub fn new_no_lock(initial_capacity: usize) -> BufExtend
Construct a new extendable buffer with given capacity. It’s ok / still fairly efficient to set this to zero.
sourcepub fn extend_lock(&self) -> ExtendGuard<'_>
pub fn extend_lock(&self) -> ExtendGuard<'_>
Obtain access to extend the underlying buffer.
sourcepub fn write_lock(&self) -> WriteGuard<'_>
pub fn write_lock(&self) -> WriteGuard<'_>
Obtain write access to the underlying buffer.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BufExtend
impl !RefUnwindSafe for BufExtend
impl Send for BufExtend
impl Sync for BufExtend
impl Unpin for BufExtend
impl !UnwindSafe for BufExtend
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> 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