pub trait NonPositive: Sign {
type InnerRepr;
// Required method
fn new_neg(value: Self::InnerRepr) -> NumeraResult<Self>
where Self: Sized;
}Expand description
Required Associated Types§
Required Methods§
Sourcefn new_neg(value: Self::InnerRepr) -> NumeraResult<Self>where
Self: Sized,
fn new_neg(value: Self::InnerRepr) -> NumeraResult<Self>where
Self: Sized,
Returns a new number that contains the negation of the value.
This allows using an unsigned type value to store only negative numbers.
§Errors
If the given value doesn’t maintain the expected invariances for
the concrete type.
Implementors§
Source§impl NonPositive for NegativeIntegers
This implementation is a no-op.
impl NonPositive for NegativeIntegers
This implementation is a no-op.
type InnerRepr = NegativeIntegers
Source§impl NonPositive for NonPositiveIntegers
This implementation is a no-op.
impl NonPositive for NonPositiveIntegers
This implementation is a no-op.