[−][src]Struct sticker_encoders::EncodingProb
An encoding with its probability.
Methods
impl<E> EncodingProb<E> where
E: ToOwned,
[src]
E: ToOwned,
pub fn new(encoding: E, prob: f32) -> Self
[src]
Create an encoding with its probability.
This constructor takes an owned encoding.
pub fn encoding(&self) -> &E
[src]
Get the encoding.
pub fn prob(&self) -> f32
[src]
Get the probability of the encoding.
Trait Implementations
impl<E: Debug> Debug for EncodingProb<E>
[src]
impl<E> From<EncodingProb<E>> for (String, f32) where
E: Clone + ToString,
[src]
E: Clone + ToString,
fn from(prob: EncodingProb<E>) -> Self
[src]
Auto Trait Implementations
impl<E> RefUnwindSafe for EncodingProb<E> where
E: RefUnwindSafe,
E: RefUnwindSafe,
impl<E> Send for EncodingProb<E> where
E: Send,
E: Send,
impl<E> Sync for EncodingProb<E> where
E: Sync,
E: Sync,
impl<E> Unpin for EncodingProb<E> where
E: Unpin,
E: Unpin,
impl<E> UnwindSafe for EncodingProb<E> where
E: UnwindSafe,
E: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,