Struct arithmetic_coding_core::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
sourceimpl<M> Model for Wrapper<M> where
M: Model,
impl<M> Model for Wrapper<M> where
M: Model,
type ValueError = Error<M::ValueError>
type ValueError = Error<M::ValueError>
Invalid symbol error
sourcefn probability(
&self,
symbol: Option<&Self::Symbol>
) -> Result<Range<Self::B>, Self::ValueError>
fn probability(
&self,
symbol: Option<&Self::Symbol>
) -> Result<Range<Self::B>, Self::ValueError>
Given a symbol, return an interval representing the probability of that symbol occurring. Read more
sourcefn max_denominator(&self) -> Self::B
fn max_denominator(&self) -> Self::B
The maximum denominator used for probability ranges. See
Model::probability
. Read more
sourcefn symbol(&self, value: Self::B) -> Option<Self::Symbol>
fn symbol(&self, value: Self::B) -> Option<Self::Symbol>
Given a value, return the symbol whose probability range it falls in. Read more
sourcefn denominator(&self) -> Self::B
fn denominator(&self) -> Self::B
The denominator for probability ranges. See Model::probability
. Read more
Auto 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more