Struct lair_keystore::dependencies::hc_seed_bundle::dependencies::sodoken::BufWrite
source · pub struct BufWrite(pub Arc<dyn AsBufWrite>);
Expand description
A concrete writable buffer type that may or may not be mem_locked.
Tuple Fields§
§0: Arc<dyn AsBufWrite>
Implementations§
source§impl BufWrite
impl BufWrite
sourcepub fn new_no_lock(size: usize) -> BufWrite
pub fn new_no_lock(size: usize) -> BufWrite
Construct a new BufWrite that is NOT mem_locked.
sourcepub fn new_mem_locked(size: usize) -> Result<BufWrite, OneErr>
pub fn new_mem_locked(size: usize) -> Result<BufWrite, OneErr>
Construct a new BufWrite that IS mem_locked. Use this for passwords / private keys, etc, but NOT everything, locked memory is a finite resource.
sourcepub fn deep_clone_no_lock<O>(o: O) -> BufWrite
pub fn deep_clone_no_lock<O>(o: O) -> BufWrite
Deep clone the data referred to by another buffer object, into a new non-memory-locked BufWrite instance.
sourcepub fn deep_clone_mem_locked<O>(o: O) -> Result<BufWrite, OneErr>
pub fn deep_clone_mem_locked<O>(o: O) -> Result<BufWrite, OneErr>
Deep clone the data referred to by another buffer object, into a new MEMORY LOCKED BufWrite instance.
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 BufWrite
impl !RefUnwindSafe for BufWrite
impl Send for BufWrite
impl Sync for BufWrite
impl Unpin for BufWrite
impl !UnwindSafe for BufWrite
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