pub struct Encoded<T, S> { /* private fields */ }Expand description
A wrapper around a value causing it to be encoded with a particular strategy.
Implementations§
Trait Implementations§
Source§impl<T, S: EncodingStrategy<T>> Encode for Encoded<T, S>
impl<T, S: EncodingStrategy<T>> Encode for Encoded<T, S>
Source§type Context = <S as EncodingStrategy<T>>::Context
type Context = <S as EncodingStrategy<T>>::Context
Context storing probability model for this type.
Source§fn encode<W: Write>(
&self,
writer: &mut Writer<W>,
ctx: &mut Self::Context,
) -> Result<(), Error>
fn encode<W: Write>( &self, writer: &mut Writer<W>, ctx: &mut Self::Context, ) -> Result<(), Error>
Encode this value to the
Writer<W>.Source§impl<T, S: EncodingStrategy<T>> Encode for Encoded<T, S>
impl<T, S: EncodingStrategy<T>> Encode for Encoded<T, S>
Source§type Context = <S as EncodingStrategy<T>>::Context
type Context = <S as EncodingStrategy<T>>::Context
Context storing probability model for this type.
Source§fn encode<E: EntropyCoder>(&self, writer: &mut E, ctx: &mut Self::Context)
fn encode<E: EntropyCoder>(&self, writer: &mut E, ctx: &mut Self::Context)
Encode this value to the [
Writer<W>].Source§impl<T: Ord, S: Ord> Ord for Encoded<T, S>
impl<T: Ord, S: Ord> Ord for Encoded<T, S>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<T: PartialOrd, S: PartialOrd> PartialOrd for Encoded<T, S>
impl<T: PartialOrd, S: PartialOrd> PartialOrd for Encoded<T, S>
impl<T: Copy, S: Copy> Copy for Encoded<T, S>
impl<T: Eq, S: Eq> Eq for Encoded<T, S>
impl<T, S> StructuralPartialEq for Encoded<T, S>
Auto Trait Implementations§
impl<T, S> Freeze for Encoded<T, S>where
T: Freeze,
impl<T, S> RefUnwindSafe for Encoded<T, S>where
T: RefUnwindSafe,
S: RefUnwindSafe,
impl<T, S> Send for Encoded<T, S>
impl<T, S> Sync for Encoded<T, S>
impl<T, S> Unpin for Encoded<T, S>
impl<T, S> UnsafeUnpin for Encoded<T, S>where
T: UnsafeUnpin,
impl<T, S> UnwindSafe for Encoded<T, S>where
T: UnwindSafe,
S: 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