Trait arithmetic_eval::arith::CheckedArithmeticKind

source ·
pub trait CheckedArithmeticKind<T> {
    // Required method
    fn checked_neg(value: T) -> Option<T>;
}
Expand description

Helper trait for CheckedArithmetic describing how number negation should be implemented.

Required Methods§

source

fn checked_neg(value: T) -> Option<T>

Negates the provided value, or returns None if the value cannot be negated.

Object Safety§

This trait is not object safe.

Implementors§