Struct arithmetic_coding_adder_dep::fixed_length::Wrapper
source · pub struct Wrapper<M>where
M: Model,{ /* private fields */ }
Expand description
A wrapper which converts a fixed_length::Model
to a
crate::Model
.
Implementations§
Trait Implementations§
source§impl<M> Model for Wrapper<M>where
M: Model,
impl<M> Model for Wrapper<M>where M: Model,
§type ValueError = Error<<M as Model>::ValueError>
type ValueError = Error<<M as Model>::ValueError>
Invalid symbol error
source§fn probability(
&self,
symbol: Option<&<Wrapper<M> as Model>::Symbol>
) -> Result<Range<<Wrapper<M> as Model>::B>, <Wrapper<M> as Model>::ValueError>
fn probability( &self, symbol: Option<&<Wrapper<M> as Model>::Symbol> ) -> Result<Range<<Wrapper<M> as Model>::B>, <Wrapper<M> as Model>::ValueError>
Given a symbol, return an interval representing the probability of that
symbol occurring. Read more
source§fn max_denominator(&self) -> <Wrapper<M> as Model>::B
fn max_denominator(&self) -> <Wrapper<M> as Model>::B
The maximum denominator used for probability ranges. See
Model::probability
. Read moresource§fn symbol(
&self,
value: <Wrapper<M> as Model>::B
) -> Option<<Wrapper<M> as Model>::Symbol>
fn symbol( &self, value: <Wrapper<M> as Model>::B ) -> Option<<Wrapper<M> as Model>::Symbol>
Given a value, return the symbol whose probability range it falls in. Read more
source§fn denominator(&self) -> <Wrapper<M> as Model>::B
fn denominator(&self) -> <Wrapper<M> as Model>::B
The denominator for probability ranges. See
Model::probability
. Read moreAuto Trait Implementations§
impl<M> RefUnwindSafe for Wrapper<M>where M: RefUnwindSafe,
impl<M> Send for Wrapper<M>where M: Send,
impl<M> Sync for Wrapper<M>where M: Sync,
impl<M> Unpin for Wrapper<M>where M: Unpin,
impl<M> UnwindSafe for Wrapper<M>where M: 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