pub struct Tolerance { /* private fields */ }Expand description
A tolerance value in percent.
Implementations§
Source§impl Tolerance
impl Tolerance
Sourcepub fn from_percent(value: f64) -> Result<Self, RatingError>
pub fn from_percent(value: f64) -> Result<Self, RatingError>
Creates a non-negative tolerance percentage.
§Errors
Returns RatingError when the value is not finite or is negative.
Trait Implementations§
Source§impl PartialOrd for Tolerance
impl PartialOrd for Tolerance
impl Copy for Tolerance
impl StructuralPartialEq for Tolerance
Auto Trait Implementations§
impl Freeze for Tolerance
impl RefUnwindSafe for Tolerance
impl Send for Tolerance
impl Sync for Tolerance
impl Unpin for Tolerance
impl UnsafeUnpin for Tolerance
impl UnwindSafe for Tolerance
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