Trait IntNeg

Source
pub trait IntNeg: Int {
    type Output: Int;
}
Expand description

Integer negation. In balanced ternary, this is just taking every “minus” and “plus” and switching them. Used as Neg<X> or <X as IntNeg>::Output.

Here, we also combine it with the functionality of the Unique operator such that they don’t need to be nested (for example in our implementation of subtraction.)

Required Associated Types§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl IntNeg for Term

Source§

impl IntNeg for Undefined

Source§

impl IntNeg for Zero<Term>

Source§

impl<N> IntNeg for Minus<N>
where N: IntNeg + Int,

Source§

impl<N> IntNeg for Plus<N>
where N: IntNeg + Int,

Source§

impl<N> IntNeg for Zero<Minus<N>>
where N: IntNeg + Int,

Source§

impl<N> IntNeg for Zero<Plus<N>>
where N: IntNeg + Int,

Source§

impl<N: Int> IntNeg for Zero<Zero<N>>
where Zero<N>: IntNeg,