pub struct Compressible;Expand description
A strategy for encoding values that are particularly compressible.
For instance, this will attempt to apply Lz77-like encoding to strings.
Trait Implementations§
Source§impl Clone for Compressible
impl Clone for Compressible
Source§fn clone(&self) -> Compressible
fn clone(&self) -> Compressible
Returns a duplicate 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 Debug for Compressible
impl Debug for Compressible
Source§impl Default for Compressible
impl Default for Compressible
Source§fn default() -> Compressible
fn default() -> Compressible
Returns the “default value” for a type. Read more
Source§impl EncodingStrategy<Option<String>> for Compressible
impl EncodingStrategy<Option<String>> for Compressible
Source§type Context = OptionContext<String, Compressible>
type Context = OptionContext<String, Compressible>
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn encode<W: Write>(
value: &Option<String>,
writer: &mut Writer<W>,
ctx: &mut Self::Context,
) -> Result<(), Error>
fn encode<W: Write>( value: &Option<String>, writer: &mut Writer<W>, ctx: &mut Self::Context, ) -> Result<(), Error>
Encode the value with this strategy.
Source§impl EncodingStrategy<Option<String>> for Compressible
impl EncodingStrategy<Option<String>> for Compressible
Source§impl EncodingStrategy<String> for Compressible
impl EncodingStrategy<String> for Compressible
Source§type Context = Lz77
type Context = Lz77
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn encode<W: Write>(
value: &String,
writer: &mut Writer<W>,
ctx: &mut Self::Context,
) -> Result<(), Error>
fn encode<W: Write>( value: &String, writer: &mut Writer<W>, ctx: &mut Self::Context, ) -> Result<(), Error>
Encode the value with this strategy.
Source§impl EncodingStrategy<String> for Compressible
impl EncodingStrategy<String> for Compressible
Source§impl EncodingStrategy<Vec<u8>> for Compressible
impl EncodingStrategy<Vec<u8>> for Compressible
Source§type Context = Lz77
type Context = Lz77
The conext (i.e. probability model) for this encoding strategy applied to this type.
Source§fn encode<W: Write>(
value: &Vec<u8>,
writer: &mut Writer<W>,
ctx: &mut Self::Context,
) -> Result<(), Error>
fn encode<W: Write>( value: &Vec<u8>, writer: &mut Writer<W>, ctx: &mut Self::Context, ) -> Result<(), Error>
Encode the value with this strategy.
Source§impl EncodingStrategy<Vec<u8>> for Compressible
impl EncodingStrategy<Vec<u8>> for Compressible
Source§impl Hash for Compressible
impl Hash for Compressible
Source§impl Ord for Compressible
impl Ord for Compressible
Source§fn cmp(&self, other: &Compressible) -> Ordering
fn cmp(&self, other: &Compressible) -> Ordering
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 PartialEq for Compressible
impl PartialEq for Compressible
Source§impl PartialOrd for Compressible
impl PartialOrd for Compressible
impl Copy for Compressible
impl Eq for Compressible
impl StructuralPartialEq for Compressible
Auto Trait Implementations§
impl Freeze for Compressible
impl RefUnwindSafe for Compressible
impl Send for Compressible
impl Sync for Compressible
impl Unpin for Compressible
impl UnsafeUnpin for Compressible
impl UnwindSafe for Compressible
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