typenum::consts

Type Alias U0

Source
pub type U0 = UTerm;

Aliased Typeยง

struct U0;

Implementations

Sourceยง

impl UTerm

Source

pub fn new() -> UTerm

Instantiates a singleton representing this unsigned integer.

Trait Implementationsยง

Sourceยง

impl Gcd<UTerm> for U0

gcd(0, 0) = 0

Sourceยง

type Output = UTerm

The greatest common divisor.
Sourceยง

impl<Y> Gcd<Y> for U0
where Y: Unsigned + NonZero,

gcd(0, y) = y

Sourceยง

type Output = Y

The greatest common divisor.
Sourceยง

impl Add<B0> for UTerm

UTerm + B0 = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the + operator.
Sourceยง

fn add(self, _: B0) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl Add<B1> for UTerm

UTerm + B1 = UInt<UTerm, B1>

Sourceยง

type Output = UInt<UTerm, B1>

The resulting type after applying the + operator.
Sourceยง

fn add(self, _: B1) -> Self::Output

Performs the + operation. Read more
Sourceยง

impl<U: Unsigned> Add<U> for UTerm

UTerm + U = U

Sourceยง

type Output = U

The resulting type after applying the + operator.
Sourceยง

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

Performs the + operation. Read more
Sourceยง

impl<Ur: Unsigned> BitAnd<Ur> for UTerm

0 & X = 0

Sourceยง

type Output = UTerm

The resulting type after applying the & operator.
Sourceยง

fn bitand(self, _: Ur) -> Self::Output

Performs the & operation. Read more
Sourceยง

impl<U: Unsigned> BitOr<U> for UTerm

UTerm | X = X

Sourceยง

type Output = U

The resulting type after applying the | operator.
Sourceยง

fn bitor(self, rhs: U) -> Self::Output

Performs the | operation. Read more
Sourceยง

impl<Ur: Unsigned> BitXor<Ur> for UTerm

0 ^ X = X

Sourceยง

type Output = Ur

The resulting type after applying the ^ operator.
Sourceยง

fn bitxor(self, rhs: Ur) -> Self::Output

Performs the ^ operation. Read more
Sourceยง

impl Clone for UTerm

Sourceยง

fn clone(&self) -> UTerm

Returns a copy of the value. Read more
1.0.0 ยท Sourceยง

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

Performs copy-assignment from source. Read more
Sourceยง

impl<U: Unsigned, B: Bit> Cmp<UInt<U, B>> for UTerm

Zero < Nonzero

Sourceยง

type Output = Less

The result of the comparison. It should only ever be one of Greater, Less, or Equal.
Sourceยง

impl Cmp for UTerm

Zero == Zero

Sourceยง

type Output = Equal

The result of the comparison. It should only ever be one of Greater, Less, or Equal.
Sourceยง

impl Debug for UTerm

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl Default for UTerm

Sourceยง

fn default() -> UTerm

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl<Ur: Unsigned, Br: Bit> Div<UInt<Ur, Br>> for UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the / operator.
Sourceยง

fn div(self, _: UInt<Ur, Br>) -> Self::Output

Performs the / operation. Read more
Sourceยง

impl<I> GetBit<I> for UTerm

Sourceยง

impl Hash for UTerm

Sourceยง

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 ยท Sourceยง

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Sourceยง

impl Len for UTerm

Length of UTerm by itself is 0

Sourceยง

type Output = UTerm

The length as a type-level unsigned integer.
Sourceยง

fn len(&self) -> Self::Output

This function isnโ€™t used in this crate, but may be useful for others.
Sourceยง

impl<U> Max<U> for UTerm
where U: Unsigned,

Sourceยง

type Output = U

The type of the maximum of Self and Rhs
Sourceยง

fn max(self, rhs: U) -> Self::Output

Method returning the maximum
Sourceยง

impl<U> Min<U> for UTerm
where U: Unsigned,

Sourceยง

type Output = UTerm

The type of the minimum of Self and Rhs
Sourceยง

fn min(self, _: U) -> Self::Output

Method returning the minimum
Sourceยง

impl Mul<B0> for UTerm

UTerm * B0 = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the * operator.
Sourceยง

fn mul(self, _: B0) -> Self::Output

Performs the * operation. Read more
Sourceยง

impl Mul<B1> for UTerm

UTerm * B1 = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the * operator.
Sourceยง

fn mul(self, _: B1) -> Self::Output

Performs the * operation. Read more
Sourceยง

impl<U: Unsigned> Mul<U> for UTerm

UTerm * U = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the * operator.
Sourceยง

fn mul(self, _: U) -> Self::Output

Performs the * operation. Read more
Sourceยง

impl Ord for UTerm

Sourceยง

fn cmp(&self, other: &UTerm) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 ยท Sourceยง

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 ยท Sourceยง

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 ยท Sourceยง

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Sourceยง

impl<Ur: Unsigned, Br: Bit> PartialDiv<UInt<Ur, Br>> for UTerm

Sourceยง

type Output = UTerm

The type of the result of the division
Sourceยง

fn partial_div(self, _: UInt<Ur, Br>) -> Self::Output

Method for performing the division
Sourceยง

impl PartialEq for UTerm

Sourceยง

fn eq(&self, other: &UTerm) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl PartialOrd for UTerm

Sourceยง

fn partial_cmp(&self, other: &UTerm) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 ยท Sourceยง

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 ยท Sourceยง

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 ยท Sourceยง

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 ยท Sourceยง

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Sourceยง

impl<Ur: Unsigned, Br: Bit> Rem<UInt<Ur, Br>> for UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the % operator.
Sourceยง

fn rem(self, _: UInt<Ur, Br>) -> Self::Output

Performs the % operation. Read more
Sourceยง

impl Shl<B0> for UTerm

Shifting UTerm by a 0 bit: UTerm << B0 = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the << operator.
Sourceยง

fn shl(self, _: B0) -> Self::Output

Performs the << operation. Read more
Sourceยง

impl Shl<B1> for UTerm

Shifting UTerm by a 1 bit: UTerm << B1 = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the << operator.
Sourceยง

fn shl(self, _: B1) -> Self::Output

Performs the << operation. Read more
Sourceยง

impl<U: Unsigned> Shl<U> for UTerm

Shifting left UTerm by an unsigned integer: UTerm << U = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the << operator.
Sourceยง

fn shl(self, _: U) -> Self::Output

Performs the << operation. Read more
Sourceยง

impl Shr<B0> for UTerm

Shifting right UTerm by a 0 bit: UTerm >> B0 = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the >> operator.
Sourceยง

fn shr(self, _: B0) -> Self::Output

Performs the >> operation. Read more
Sourceยง

impl Shr<B1> for UTerm

Shifting right UTerm by a 1 bit: UTerm >> B1 = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the >> operator.
Sourceยง

fn shr(self, _: B1) -> Self::Output

Performs the >> operation. Read more
Sourceยง

impl<U: Unsigned> Shr<U> for UTerm

Shifting right a UTerm by an unsigned integer: UTerm >> U = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the >> operator.
Sourceยง

fn shr(self, _: U) -> Self::Output

Performs the >> operation. Read more
Sourceยง

impl Sub<B0> for UTerm

UTerm - B0 = Term

Sourceยง

type Output = UTerm

The resulting type after applying the - operator.
Sourceยง

fn sub(self, _: B0) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl Sub for UTerm

UTerm - UTerm = UTerm

Sourceยง

type Output = UTerm

The resulting type after applying the - operator.
Sourceยง

fn sub(self, _: UTerm) -> Self::Output

Performs the - operation. Read more
Sourceยง

impl ToInt<i16> for UTerm

Sourceยง

const INT: i16 = 0i16

The concrete value for the type. Can be used in const contexts.
Sourceยง

fn to_int() -> i16

Method returning the concrete value for the type.
Sourceยง

impl ToInt<i32> for UTerm

Sourceยง

const INT: i32 = 0i32

The concrete value for the type. Can be used in const contexts.
Sourceยง

fn to_int() -> i32

Method returning the concrete value for the type.
Sourceยง

impl ToInt<i64> for UTerm

Sourceยง

const INT: i64 = 0i64

The concrete value for the type. Can be used in const contexts.
Sourceยง

fn to_int() -> i64

Method returning the concrete value for the type.
Sourceยง

impl ToInt<i8> for UTerm

Sourceยง

const INT: i8 = 0i8

The concrete value for the type. Can be used in const contexts.
Sourceยง

fn to_int() -> i8

Method returning the concrete value for the type.
Sourceยง

impl ToInt<u16> for UTerm

Sourceยง

const INT: u16 = 0u16

The concrete value for the type. Can be used in const contexts.
Sourceยง

fn to_int() -> u16

Method returning the concrete value for the type.
Sourceยง

impl ToInt<u32> for UTerm

Sourceยง

const INT: u32 = 0u32

The concrete value for the type. Can be used in const contexts.
Sourceยง

fn to_int() -> u32

Method returning the concrete value for the type.
Sourceยง

impl ToInt<u64> for UTerm

Sourceยง

const INT: u64 = 0u64

The concrete value for the type. Can be used in const contexts.
Sourceยง

fn to_int() -> u64

Method returning the concrete value for the type.
Sourceยง

impl ToInt<u8> for UTerm

Sourceยง

const INT: u8 = 0u8

The concrete value for the type. Can be used in const contexts.
Sourceยง

fn to_int() -> u8

Method returning the concrete value for the type.
Sourceยง

impl ToInt<usize> for UTerm

Sourceยง

const INT: usize = 0usize

The concrete value for the type. Can be used in const contexts.
Sourceยง

fn to_int() -> usize

Method returning the concrete value for the type.
Sourceยง

impl Unsigned for UTerm

Sourceยง

impl Copy for UTerm

Sourceยง

impl Eq for UTerm

Sourceยง

impl StructuralPartialEq for UTerm

Sourceยง

impl Zero for UTerm