pub trait Trit: Copy + Sized + Debug + Hash + Into<i8> + Ord + PartialEq + ShiftTernary + TryFrom<i8> + Display {
    fn checked_increment(self) -> Option<Self>;
    fn zero() -> Self;
    fn as_arbitrary_ref<'a>(&self) -> &'a Self;
    fn add_to_num<I: Num + CheckedAdd + CheckedSub>(
        &self,
        n: I
    ) -> Result<I, Error>; }
Expand description

A trait implemented by both balanced (Btrit) and unbalanced (Utrit) trits.

Required Methods

Attempt to increment the value of this trit, returning None if an overflow occurred.

The zero value of this trit.

Turn this trit reference into one with an arbitrary lifetime.

Note that this is largely an implementation detail and is rarely useful for API users.

Attempt to add this trit to a numeric value.

Implementors