Struct sodoken::buffer::BufWriteMemLocked
source · pub struct BufWriteMemLocked(/* private fields */);
Expand description
This writable buffer type is mem_locked. Use this for passwords / private keys, etc, but NOT everything, locked memory is a finite resource.
Implementations§
source§impl BufWriteMemLocked
impl BufWriteMemLocked
sourcepub fn new(size: usize) -> SodokenResult<Self>
pub fn new(size: usize) -> SodokenResult<Self>
Construct a new writable, mem_locked buffer. Use this for passwords / private keys, etc, but NOT everything, locked memory is a finite resource.
Trait Implementations§
source§impl AsBufExtend for BufWriteMemLocked
impl AsBufExtend for BufWriteMemLocked
source§fn extend_lock(&self) -> ExtendGuard<'_>
fn extend_lock(&self) -> ExtendGuard<'_>
Obtain access to extend the underlying buffer.
Warning: Depending on the underlying data type,
each new ExtendGuard could be a new cursor… i.e.
pulling a new extend lock could overwrite previous data.
source§impl AsBufRead for BufWriteMemLocked
impl AsBufRead for BufWriteMemLocked
source§impl AsBufWrite for BufWriteMemLocked
impl AsBufWrite for BufWriteMemLocked
source§fn write_lock(&self) -> WriteGuard<'_>
fn write_lock(&self) -> WriteGuard<'_>
Obtain write access to the underlying buffer.
source§fn into_read(self: Arc<Self>) -> BufRead
fn into_read(self: Arc<Self>) -> BufRead
Downgrade this to a read-only reference
without cloning internal data
and without changing memory locking strategy.
source§fn into_extend(self: Arc<Self>) -> BufExtend
fn into_extend(self: Arc<Self>) -> BufExtend
Transform this buffer into an extendable type.
Auto Trait Implementations§
impl !RefUnwindSafe for BufWriteMemLocked
impl Send for BufWriteMemLocked
impl Sync for BufWriteMemLocked
impl Unpin for BufWriteMemLocked
impl UnwindSafe for BufWriteMemLocked
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