Enum stochasta::ProbabilityRatioError
source · pub enum ProbabilityRatioError {
DenominatorZero,
RatioLowerZero,
RatioGreaterOne,
}
Expand description
Errors that may happen when trying to create a probability.
Variants§
DenominatorZero
The denominator must not be 0. That’s a basic math rule!
RatioLowerZero
The ratio of Probability
cannot be lower than 0.
RatioGreaterOne
The ratio of Probability
cannot be higher than 1.
Trait Implementations§
source§impl Clone for ProbabilityRatioError
impl Clone for ProbabilityRatioError
source§fn clone(&self) -> ProbabilityRatioError
fn clone(&self) -> ProbabilityRatioError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ProbabilityRatioError
impl Debug for ProbabilityRatioError
source§impl<'de> Deserialize<'de> for ProbabilityRatioError
impl<'de> Deserialize<'de> for ProbabilityRatioError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for ProbabilityRatioError
impl Display for ProbabilityRatioError
source§impl Error for ProbabilityRatioError
impl Error for ProbabilityRatioError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl Hash for ProbabilityRatioError
impl Hash for ProbabilityRatioError
source§impl Ord for ProbabilityRatioError
impl Ord for ProbabilityRatioError
source§fn cmp(&self, other: &ProbabilityRatioError) -> Ordering
fn cmp(&self, other: &ProbabilityRatioError) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<ProbabilityRatioError> for ProbabilityRatioError
impl PartialEq<ProbabilityRatioError> for ProbabilityRatioError
source§fn eq(&self, other: &ProbabilityRatioError) -> bool
fn eq(&self, other: &ProbabilityRatioError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ProbabilityRatioError> for ProbabilityRatioError
impl PartialOrd<ProbabilityRatioError> for ProbabilityRatioError
source§fn partial_cmp(&self, other: &ProbabilityRatioError) -> Option<Ordering>
fn partial_cmp(&self, other: &ProbabilityRatioError) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ProbabilityRatioError
impl Serialize for ProbabilityRatioError
impl Copy for ProbabilityRatioError
impl Eq for ProbabilityRatioError
impl StructuralEq for ProbabilityRatioError
impl StructuralPartialEq for ProbabilityRatioError
Auto Trait Implementations§
impl RefUnwindSafe for ProbabilityRatioError
impl Send for ProbabilityRatioError
impl Sync for ProbabilityRatioError
impl Unpin for ProbabilityRatioError
impl UnwindSafe for ProbabilityRatioError
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