pub struct BufReadSized<const N: usize>(pub Arc<dyn AsBufReadSized<N> + 'static>);
Expand description
A concrete sized read-only buffer type that may or may not be mem_locked.
Tuple Fields
0: Arc<dyn AsBufReadSized<N> + 'static>
Implementations
impl<const N: usize> BufReadSized<N>
impl<const N: usize> BufReadSized<N>
pub fn new_no_lock(content: [u8; N]) -> BufReadSized<N>
pub fn new_no_lock(content: [u8; N]) -> BufReadSized<N>
Construct a new BufReadSized that is NOT mem_locked.
pub fn read_lock_sized(&self) -> ReadGuardSized<'_, N>
pub fn read_lock_sized(&self) -> ReadGuardSized<'_, N>
Obtain read access to the underlying buffer.
pub fn to_read_unsized(&self) -> BufRead
pub fn to_read_unsized(&self) -> BufRead
Convert to an unsized BufRead instance without cloning internal data and without changing memory locking strategy.
pub fn try_unwrap(self) -> Result<Box<[u8], Global>, BufRead>
pub fn try_unwrap(self) -> Result<Box<[u8], Global>, BufRead>
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.
pub fn try_unwrap_sized(self) -> Result<[u8; N], BufReadSized<N>>
pub fn try_unwrap_sized(self) -> 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.
Trait Implementations
impl<const N: usize> Clone for BufReadSized<N>
impl<const N: usize> Clone for BufReadSized<N>
fn clone(&self) -> BufReadSized<N>
fn clone(&self) -> BufReadSized<N>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<const N: usize> Debug for BufReadSized<N>
impl<const N: usize> Debug for BufReadSized<N>
impl<'a, const N: usize> From<&'a [u8]> for BufReadSized<N>
impl<'a, const N: usize> From<&'a [u8]> for BufReadSized<N>
fn from(b: &'a [u8]) -> BufReadSized<N>
fn from(b: &'a [u8]) -> BufReadSized<N>
Converts to this type from the input type.
impl<const N: usize> From<[u8; N]> for BufReadSized<N>
impl<const N: usize> From<[u8; N]> for BufReadSized<N>
fn from(b: [u8; N]) -> BufReadSized<N>
fn from(b: [u8; N]) -> BufReadSized<N>
Converts to this type from the input type.
impl<const S: usize> From<BufReadSized<S>> for BufRead
impl<const S: usize> From<BufReadSized<S>> for BufRead
fn from(b: BufReadSized<S>) -> BufRead
fn from(b: BufReadSized<S>) -> BufRead
Converts to this type from the input type.
impl<const S: usize> From<BufWriteSized<S>> for BufReadSized<S>
impl<const S: usize> From<BufWriteSized<S>> for BufReadSized<S>
fn from(b: BufWriteSized<S>) -> BufReadSized<S>
fn from(b: BufWriteSized<S>) -> BufReadSized<S>
Converts to this type from the input type.
impl<const N: usize> From<U8Array<N>> for BufReadSized<N>
impl<const N: usize> From<U8Array<N>> for BufReadSized<N>
fn from(o: U8Array<N>) -> BufReadSized<N>
fn from(o: U8Array<N>) -> BufReadSized<N>
Converts to this type from the input type.
Auto Trait Implementations
impl<const N: usize> !RefUnwindSafe for BufReadSized<N>
impl<const N: usize> Send for BufReadSized<N>
impl<const N: usize> Sync for BufReadSized<N>
impl<const N: usize> Unpin for BufReadSized<N>
impl<const N: usize> !UnwindSafe for BufReadSized<N>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more