Struct arithmetic_eval::arith::NegateOnlyZero
source · pub struct NegateOnlyZero(/* private fields */);
Expand description
Marker for CheckedArithmetic
signalling that negation is only possible for zero.
Trait Implementations§
source§impl<T: Unsigned + Zero> CheckedArithmeticKind<T> for NegateOnlyZero
impl<T: Unsigned + Zero> CheckedArithmeticKind<T> for NegateOnlyZero
source§fn checked_neg(value: T) -> Option<T>
fn checked_neg(value: T) -> Option<T>
Negates the provided
value
, or returns None
if the value cannot be negated.Auto Trait Implementations§
impl Freeze for NegateOnlyZero
impl RefUnwindSafe for NegateOnlyZero
impl Send for NegateOnlyZero
impl Sync for NegateOnlyZero
impl Unpin for NegateOnlyZero
impl UnwindSafe for NegateOnlyZero
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