Struct peano::Zero [] [src]

pub struct Zero;

The type corresponding to the Peano number 0.

Trait Implementations

impl Clone for Zero
[src]

fn clone(&self) -> Zero

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Zero
[src]

impl Peano for Zero
[src]

impl NonNeg for Zero
[src]

impl NonPos for Zero
[src]

impl<Rhs> Add<Rhs> for Zero where Rhs: Peano
[src]

Add to Zero (e.g. 0 + 3)

type Output = Rhs

The resulting type after applying the + operator

fn add(self, rhs: Rhs) -> Self::Output

The method for the + operator

impl Neg for Zero
[src]

The negation of Zero is itself.

type Output = Zero

The resulting type after applying the - operator

fn neg(self) -> Self::Output

The method for the unary - operator

impl<Rhs> Sub<Rhs> for Zero where Rhs: Neg
[src]

Subtract from Zero (e.g. 0 - 4)

type Output = Rhs::Output

The resulting type after applying the - operator

fn sub(self, rhs: Rhs) -> Self::Output

The method for the - operator

impl<Rhs> Mul<Rhs> for Zero where Rhs: Peano
[src]

Multiply Zero by peano numbers (e.g. 0 * 7)

type Output = Zero

The resulting type after applying the * operator

fn mul(self, rhs: Rhs) -> Self::Output

The method for the * operator

impl<Rhs> Div<Rhs> for Zero where Rhs: Peano
[src]

Divide Zero by a number (e.g. 0 / 5)

type Output = Zero

The resulting type after applying the / operator

fn div(self, rhs: Rhs) -> Self::Output

The method for the / operator

impl ToInt for Zero
[src]

fn to_int() -> i32