pub trait AsBufWrite: AsBufRead {
    // Required methods
    fn write_lock(&self) -> WriteGuard<'_>;
    fn into_read(self: Arc<Self>) -> BufRead;
    fn into_extend(self: Arc<Self>) -> BufExtend;
}
Expand description

A writable buffer that may or may not be mem_locked.

Required Methods§

source

fn write_lock(&self) -> WriteGuard<'_>

Obtain write access to the underlying buffer.

source

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

Transform this buffer into an extendable type.

Implementations on Foreign Types§

source§

impl AsBufWrite for RwLock<Box<[u8]>>

source§

fn write_lock(&self) -> WriteGuard<'_>

source§

fn into_read(self: Arc<Self>) -> BufRead

source§

fn into_extend(self: Arc<Self>) -> BufExtend

source§

impl AsBufWrite for RwLock<Vec<u8>>

source§

fn write_lock(&self) -> WriteGuard<'_>

source§

fn into_read(self: Arc<Self>) -> BufRead

source§

fn into_extend(self: Arc<Self>) -> BufExtend

source§

impl<const N: usize> AsBufWrite for RwLock<[u8; N]>

source§

fn write_lock(&self) -> WriteGuard<'_>

source§

fn into_read(self: Arc<Self>) -> BufRead

source§

fn into_extend(self: Arc<Self>) -> BufExtend

Implementors§