pub struct Uninit<B> { /* private fields */ }Available on crate feature
std only.Expand description
A read-target view of a buffer’s writable spare [buf_len, capacity): reading
into it appends to the underlying (the view’s offset 0 is the underlying’s
buf_len). Created by IoBufMut::uninit; recover the buffer with
into_inner.
Implementations§
Source§impl<B> Uninit<B>
impl<B> Uninit<B>
Sourcepub fn into_inner(self) -> B
pub fn into_inner(self) -> B
Recover the underlying buffer, with whatever was read into the spare now part of its initialized region.
Trait Implementations§
Source§impl<B: IoBufMut> IoBufMut for Uninit<B>
impl<B: IoBufMut> IoBufMut for Uninit<B>
Source§fn as_uninit(&mut self) -> &mut [MaybeUninit<u8>]
fn as_uninit(&mut self) -> &mut [MaybeUninit<u8>]
The full backing storage as possibly-uninitialized bytes: the initialized
prefix
[0, buf_len) plus the writable spare [buf_len, capacity). Read moreSource§fn buf_capacity(&mut self) -> usize
fn buf_capacity(&mut self) -> usize
Total capacity (
as_uninit().len()).Source§fn buf_mut_ptr(&mut self) -> *mut u8
fn buf_mut_ptr(&mut self) -> *mut u8
Source§fn spare_mut(&mut self) -> &mut [MaybeUninit<u8>]
fn spare_mut(&mut self) -> &mut [MaybeUninit<u8>]
The writable spare tail
[buf_len, capacity) — the read destination.Source§fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
The initialized region
[0, buf_len) as a mutable slice, for an
in-place transform (e.g. decrypting a TLS record inside the very buffer it
arrived in, no copy).Auto Trait Implementations§
impl<B> Freeze for Uninit<B>where
B: Freeze,
impl<B> RefUnwindSafe for Uninit<B>where
B: RefUnwindSafe,
impl<B> Send for Uninit<B>where
B: Send,
impl<B> Sync for Uninit<B>where
B: Sync,
impl<B> Unpin for Uninit<B>where
B: Unpin,
impl<B> UnsafeUnpin for Uninit<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for Uninit<B>where
B: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> RamaTryFrom<T> for Uwhere
U: TryFrom<T>,
Source§impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
impl<T, U, CrateMarker> RamaTryInto<U, CrateMarker> for Twhere
U: RamaTryFrom<T, CrateMarker>,
type Error = <U as RamaTryFrom<T, CrateMarker>>::Error
fn rama_try_into(self) -> Result<U, <U as RamaTryFrom<T, CrateMarker>>::Error>
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<V, F> ValueFormatter<&V> for F
impl<V, F> ValueFormatter<&V> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &&V)
fn format_value(writer: impl ValueWriter, value: &&V)
Write
value to writerSource§impl<V, F> ValueFormatter<Arc<V>> for F
impl<V, F> ValueFormatter<Arc<V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Arc<V>)
fn format_value(writer: impl ValueWriter, value: &Arc<V>)
Write
value to writerSource§impl<V, F> ValueFormatter<Box<V>> for F
impl<V, F> ValueFormatter<Box<V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Box<V>)
fn format_value(writer: impl ValueWriter, value: &Box<V>)
Write
value to writerSource§impl<V, F> ValueFormatter<Cow<'_, V>> for F
impl<V, F> ValueFormatter<Cow<'_, V>> for F
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
fn format_value(writer: impl ValueWriter, value: &Cow<'_, V>)
Write
value to writerSource§impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
impl<V, F> ValueFormatter<Option<V>> for Fwhere
F: ValueFormatter<V> + ?Sized,
Source§const SHAPE: FieldShape<'static>
const SHAPE: FieldShape<'static>
Available on non-
metrique_require_explicit_impls only.The shape of values produced by this formatter. Read more
Source§fn format_value(writer: impl ValueWriter, value: &Option<V>)
fn format_value(writer: impl ValueWriter, value: &Option<V>)
Write
value to writer