pub struct ValueBuilder<F> {
pub size: usize,
pub f: F,
}Expand description
A value builder for the wal, which requires the value size for accurate allocation and a closure to build the value.
Fields§
§size: usizeThe required size of the builder.
f: FThe builder closure.
Implementations§
Source§impl<F> ValueBuilder<F>
impl<F> ValueBuilder<F>
Source§impl<F> ValueBuilder<F>
impl<F> ValueBuilder<F>
Trait Implementations§
Source§impl<W, E> BufWriter for ValueBuilder<W>
impl<W, E> BufWriter for ValueBuilder<W>
Source§impl<W, E> BufWriterOnce for ValueBuilder<W>
impl<W, E> BufWriterOnce for ValueBuilder<W>
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
The length of the encoded bytes.
Source§fn write_once(self, buf: &mut VacantBuffer<'_>) -> Result<usize, Self::Error>
fn write_once(self, buf: &mut VacantBuffer<'_>) -> Result<usize, Self::Error>
Encode self to bytes and write to the
VacantBuffer. Read moreSource§impl<F: Clone> Clone for ValueBuilder<F>
impl<F: Clone> Clone for ValueBuilder<F>
Source§fn clone(&self) -> ValueBuilder<F>
fn clone(&self) -> ValueBuilder<F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F: Debug> Debug for ValueBuilder<F>
impl<F: Debug> Debug for ValueBuilder<F>
Source§impl<F> From<(usize, F)> for ValueBuilder<F>
impl<F> From<(usize, F)> for ValueBuilder<F>
Source§impl<F> From<ValueBuilder<F>> for (usize, F)
impl<F> From<ValueBuilder<F>> for (usize, F)
Source§fn from(builder: ValueBuilder<F>) -> Self
fn from(builder: ValueBuilder<F>) -> Self
Converts to this type from the input type.
impl<F: Copy> Copy for ValueBuilder<F>
Auto Trait Implementations§
impl<F> Freeze for ValueBuilder<F>where
F: Freeze,
impl<F> RefUnwindSafe for ValueBuilder<F>where
F: RefUnwindSafe,
impl<F> Send for ValueBuilder<F>where
F: Send,
impl<F> Sync for ValueBuilder<F>where
F: Sync,
impl<F> Unpin for ValueBuilder<F>where
F: Unpin,
impl<F> UnwindSafe for ValueBuilder<F>where
F: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoAmong for T
impl<T> IntoAmong for T
Source§fn into_among_with<F>(self, into_left: F) -> Among<Self, Self, Self>
fn into_among_with<F>(self, into_left: F) -> Among<Self, Self, Self>
Converts
self into a Left variant of Among<Self, Self>
if into_left(&self) returns Some(true). Read moreSource§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more