[][src]Module yolol_number::prelude

Import this to get the standard YololNumber typedef and all the traits you need to perform all the operations that you could want.

Traits

AsPrimitive

A generic interface for casting between machine scalars with the as operator, which admits narrowing and precision loss. Implementers of this trait AsPrimitive should behave like a primitive numeric type (e.g. a newtype around another primitive), and the intended conversion must never fail.

Bounded

Numbers which have upper and lower bounds

CheckedAdd

Performs addition that returns None instead of wrapping around on overflow.

CheckedDiv

Performs division that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.

CheckedMul

Performs multiplication that returns None instead of wrapping around on underflow or overflow.

CheckedRem

Performs an integral remainder that returns None instead of panicking on division by zero and instead of wrapping around on underflow and overflow.

CheckedSub

Performs subtraction that returns None instead of wrapping around on underflow.

Num

The base trait for numeric types, covering 0 and 1 values, comparisons, basic numeric operations, and string conversion.

NumCast

An interface for casting between machine scalars.

NumOps

The trait for types implementing basic numeric operations

Signed

Useful functions for signed numbers (i.e. numbers that can be negative).

YololOps

Type Definitions

YololNumber