Trait holochain::prelude::dependencies::kitsune_p2p_types::dependencies::lair_keystore_api::dependencies::hc_seed_bundle::dependencies::sodoken::buffer::AsBufReadSized
source · pub trait AsBufReadSized<const N: usize>: 'static + AsBufRead + Debug + Send + Sync {
// Required methods
fn read_lock_sized(&self) -> ReadGuardSized<'_, N>;
fn into_read_unsized(self: Arc<Self, Global>) -> BufRead;
fn try_unwrap_sized(
self: Arc<Self, Global>
) -> Result<[u8; N], BufReadSized<N>>;
}
Expand description
A sized readable buffer that may or may not be mem_locked.
Required Methods§
sourcefn read_lock_sized(&self) -> ReadGuardSized<'_, N>
fn read_lock_sized(&self) -> ReadGuardSized<'_, N>
Obtain read access to the underlying buffer.
sourcefn into_read_unsized(self: Arc<Self, Global>) -> BufRead
fn into_read_unsized(self: Arc<Self, Global>) -> BufRead
Convert to an unsized BufRead instance without cloning internal data and without changing memory locking strategy.
sourcefn try_unwrap_sized(self: Arc<Self, Global>) -> Result<[u8; N], BufReadSized<N>>
fn try_unwrap_sized(self: Arc<Self, Global>) -> Result<[u8; N], BufReadSized<N>>
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.