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,
Source§type ValueError = Error<<M as Model>::ValueError>
type ValueError = Error<<M as Model>::ValueError>
Invalid symbol error
Source§fn 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
Source§fn max_denominator(&self) -> Self::B
fn max_denominator(&self) -> Self::B
The maximum denominator used for probability ranges. See
Model::probability
. Read moreSource§fn 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
Source§fn denominator(&self) -> Self::B
fn denominator(&self) -> Self::B
The denominator for probability ranges. See
Model::probability
. Read moreAuto Trait Implementations§
impl<M> Freeze for Wrapper<M>where
M: Freeze,
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