pub trait AsBufReadSized<const N: usize>: 'static + AsBufRead + Debug + Send + Sync {
    fn read_lock_sized(&self) -> ReadGuardSized<'_, N>;
    fn into_read_unsized(self: Arc<Self>) -> BufRead;
    fn try_unwrap_sized(self: Arc<Self>) -> Result<[u8; N], BufReadSized<N>>;
}
Expand description

A sized readable buffer that may or may not be mem_locked.

Required Methods§

Obtain read access to the underlying buffer.

Convert to an unsized BufRead instance without cloning internal data and without changing memory locking strategy.

Attempt to extract the inner contents of this buf without cloning. If this memory is locked or there are clones of this reference, the unwrap will fail, returning a BufRead instance.

Implementations on Foreign Types§

Implementors§