pub struct Slice<T, F, U, V>{ /* private fields */ }
Expand description
A wrapper for a slice of encodable values.
A value of this type will take something that can provide a reference to a slice of some value and a closure that converts the values of the slice into something encodable.
Implementations§
Trait Implementations§
source§impl<T, F, U, V> Values for Slice<T, F, U, V>
impl<T, F, U, V> Values for Slice<T, F, U, V>
source§fn encoded_len(&self, mode: Mode) -> usize
fn encoded_len(&self, mode: Mode) -> usize
Returns the length of the encoded values for the given mode.
source§fn write_encoded<W: Write>(
&self,
mode: Mode,
target: &mut W
) -> Result<(), Error>
fn write_encoded<W: Write>( &self, mode: Mode, target: &mut W ) -> Result<(), Error>
Encodes the values in the given mode and writes them to
target
.source§fn explicit(self, tag: Tag) -> Constructed<Self>where
Self: Sized,
fn explicit(self, tag: Tag) -> Constructed<Self>where
Self: Sized,
Converts the encoder into one with an explicit tag.
source§fn to_captured(&self, mode: Mode) -> Captured
fn to_captured(&self, mode: Mode) -> Captured
Captures the encoded values in the given mode.
Auto Trait Implementations§
impl<T, F, U, V> RefUnwindSafe for Slice<T, F, U, V>
impl<T, F, U, V> Send for Slice<T, F, U, V>
impl<T, F, U, V> Sync for Slice<T, F, U, V>
impl<T, F, U, V> Unpin for Slice<T, F, U, V>
impl<T, F, U, V> UnwindSafe for Slice<T, F, U, V>
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