pub enum WeightedReservoirError {
NonFiniteWeight(f64),
NonPositiveWeight(f64),
}Expand description
Errors for weighted reservoir sampling.
Variants§
Trait Implementations§
Source§impl Clone for WeightedReservoirError
impl Clone for WeightedReservoirError
Source§fn clone(&self) -> WeightedReservoirError
fn clone(&self) -> WeightedReservoirError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 WeightedReservoirError
impl Debug for WeightedReservoirError
Source§impl Display for WeightedReservoirError
impl Display for WeightedReservoirError
Source§impl Error for WeightedReservoirError
impl Error for WeightedReservoirError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for WeightedReservoirError
impl PartialEq for WeightedReservoirError
Source§fn eq(&self, other: &WeightedReservoirError) -> bool
fn eq(&self, other: &WeightedReservoirError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for WeightedReservoirError
Auto Trait Implementations§
impl Freeze for WeightedReservoirError
impl RefUnwindSafe for WeightedReservoirError
impl Send for WeightedReservoirError
impl Sync for WeightedReservoirError
impl Unpin for WeightedReservoirError
impl UnsafeUnpin for WeightedReservoirError
impl UnwindSafe for WeightedReservoirError
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