pub struct OneShot<const N: u32>;
Trait Implementations
sourceimpl<const N: u32> Model for OneShot<N>
impl<const N: u32> Model for OneShot<N>
type ValueError = !
type ValueError = !
Invalid symbol error
sourcefn probability(
&self,
symbol: &Self::Symbol
) -> Result<Range<Self::B>, Self::ValueError>
fn probability(
&self,
symbol: &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
Auto Trait Implementations
impl<const N: u32> RefUnwindSafe for OneShot<N>
impl<const N: u32> Send for OneShot<N>
impl<const N: u32> Sync for OneShot<N>
impl<const N: u32> Unpin for OneShot<N>
impl<const N: u32> UnwindSafe for OneShot<N>
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
impl<T> Model for T where
T: Model,
impl<T> Model for T where
T: Model,
type B = <T as Model>::B
type B = <T as Model>::B
The internal representation to use for storing integers
type Symbol = <T as Model>::Symbol
type Symbol = <T as Model>::Symbol
The type of symbol this [Model
] describes
type ValueError = <T as Model>::ValueError
type ValueError = <T as Model>::ValueError
Invalid symbol error
fn probability(
&self,
symbol: &<T as Model>::Symbol
) -> Result<Range<<T as Model>::B>, <T as Model>::ValueError>
fn probability(
&self,
symbol: &<T as Model>::Symbol
) -> Result<Range<<T as Model>::B>, <T as Model>::ValueError>
Given a symbol, return an interval representing the probability of that symbol occurring. Read more
fn max_denominator(&self) -> <T as Model>::B
fn max_denominator(&self) -> <T as Model>::B
The maximum denominator used for probability ranges. See
[Model::probability
]. Read more
fn symbol(&self, value: <T as Model>::B) -> <T as Model>::Symbol
fn symbol(&self, value: <T as Model>::B) -> <T as Model>::Symbol
Given a value, return the symbol whose probability range it falls in. Read more
fn denominator(&self) -> <T as Model>::B
fn denominator(&self) -> <T as Model>::B
The denominator for probability ranges. See [Model::probability
]. Read more