pub struct Sorted;Expand description
A strategy for encoding values that have been sorted.
Trait Implementations§
Source§impl EncodingStrategy<String> for Sorted
impl EncodingStrategy<String> for Sorted
Source§type Context = SortedContext
type Context = SortedContext
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn decode<R: Read>(
reader: &mut Reader<R>,
ctx: &mut Self::Context,
) -> Result<String, Error>
fn decode<R: Read>( reader: &mut Reader<R>, ctx: &mut Self::Context, ) -> Result<String, Error>
Decode the value using this strategy.
Source§impl EncodingStrategy<String> for Sorted
impl EncodingStrategy<String> for Sorted
Source§impl<T: Encode + Clone + Eq> EncodingStrategy<Vec<T>> for Sorted
impl<T: Encode + Clone + Eq> EncodingStrategy<Vec<T>> for Sorted
Source§type Context = SortedContext<T>
type Context = SortedContext<T>
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn decode<R: Read>(
reader: &mut Reader<R>,
ctx: &mut Self::Context,
) -> Result<Vec<T>, Error>
fn decode<R: Read>( reader: &mut Reader<R>, ctx: &mut Self::Context, ) -> Result<Vec<T>, Error>
Decode the value using this strategy.
Source§impl<T: Encode + Clone + Eq> EncodingStrategy<Vec<T>> for Sorted
impl<T: Encode + Clone + Eq> EncodingStrategy<Vec<T>> for Sorted
Source§impl EncodingStrategy<bool> for Sorted
impl EncodingStrategy<bool> for Sorted
Source§type Context = BitContext
type Context = BitContext
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn decode<R: Read>(
reader: &mut Reader<R>,
ctx: &mut Self::Context,
) -> Result<bool, Error>
fn decode<R: Read>( reader: &mut Reader<R>, ctx: &mut Self::Context, ) -> Result<bool, Error>
Decode the value using this strategy.
Source§impl EncodingStrategy<bool> for Sorted
impl EncodingStrategy<bool> for Sorted
Source§impl EncodingStrategy<u16> for Sorted
impl EncodingStrategy<u16> for Sorted
Source§type Context = SortedContext
type Context = SortedContext
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn encode<W: Write>(
value: &u16,
writer: &mut Writer<W>,
ctx: &mut Self::Context,
) -> Result<(), Error>
fn encode<W: Write>( value: &u16, writer: &mut Writer<W>, ctx: &mut Self::Context, ) -> Result<(), Error>
Encode the value with this strategy.
Source§impl EncodingStrategy<u16> for Sorted
impl EncodingStrategy<u16> for Sorted
Source§impl EncodingStrategy<u32> for Sorted
impl EncodingStrategy<u32> for Sorted
Source§type Context = SortedContext
type Context = SortedContext
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn encode<W: Write>(
value: &u32,
writer: &mut Writer<W>,
ctx: &mut Self::Context,
) -> Result<(), Error>
fn encode<W: Write>( value: &u32, writer: &mut Writer<W>, ctx: &mut Self::Context, ) -> Result<(), Error>
Encode the value with this strategy.
Source§impl EncodingStrategy<u32> for Sorted
impl EncodingStrategy<u32> for Sorted
Source§impl EncodingStrategy<u64> for Sorted
impl EncodingStrategy<u64> for Sorted
Source§type Context = SortedContext
type Context = SortedContext
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn encode<W: Write>(
value: &u64,
writer: &mut Writer<W>,
ctx: &mut Self::Context,
) -> Result<(), Error>
fn encode<W: Write>( value: &u64, writer: &mut Writer<W>, ctx: &mut Self::Context, ) -> Result<(), Error>
Encode the value with this strategy.
Source§impl EncodingStrategy<u64> for Sorted
impl EncodingStrategy<u64> for Sorted
Source§impl EncodingStrategy<usize> for Sorted
impl EncodingStrategy<usize> for Sorted
Source§type Context = SortedContext
type Context = SortedContext
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn encode<W: Write>(
value: &usize,
writer: &mut Writer<W>,
ctx: &mut Self::Context,
) -> Result<(), Error>
fn encode<W: Write>( value: &usize, writer: &mut Writer<W>, ctx: &mut Self::Context, ) -> Result<(), Error>
Encode the value with this strategy.
Source§impl EncodingStrategy<usize> for Sorted
impl EncodingStrategy<usize> for Sorted
Source§impl Ord for Sorted
impl Ord for Sorted
Source§impl PartialOrd for Sorted
impl PartialOrd for Sorted
impl Copy for Sorted
impl Eq for Sorted
impl StructuralPartialEq for Sorted
Auto Trait Implementations§
impl Freeze for Sorted
impl RefUnwindSafe for Sorted
impl Send for Sorted
impl Sync for Sorted
impl Unpin for Sorted
impl UnsafeUnpin for Sorted
impl UnwindSafe for Sorted
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