Struct ketos::integer::Integer [] [src]

pub struct Integer(_);

Arbitrary precision signed integer

Methods

impl Integer
[src]

Returns the number of bits required to represent the Integer.

Creates an Integer from a sign and a series of big-endian bytes.

Creates an Integer from a sign and a series of little-endian bytes.

Creates an Integer with the value of the given f64. Returns None if the value cannot be converted.

Creates an Integer with the value of the given i8.

Creates an Integer with the value of the given i16.

Creates an Integer with the value of the given i32.

Creates an Integer with the value of the given i64.

Creates an Integer with the value of the given isize.

Creates an Integer with the value of the given u8.

Creates an Integer with the value of the given u16.

Creates an Integer with the value of the given u32.

Creates an Integer with the value of the given u64.

Creates an Integer with the value of the given usize.

Returns an Integer represented by a string in the given radix. radix must be in the range [2, 36].

Returns integer sign and a series of big-endian bytes.

Returns integer sign and a series of little-endian bytes.

Returns a string representation of the Integer in the given radix. radix must be in the range [2, 36].

Returns the Integer as an i8 value.

Returns the Integer as an i16 value.

Returns the Integer as an i32 value.

Returns the Integer as an i64 value.

Returns the Integer as an isize value.

Returns the Integer as an u8 value.

Returns the Integer as an u16 value.

Returns the Integer as an u32 value.

Returns the Integer as an u64 value.

Returns the Integer as an usize value.

Returns the Integer as an f32 value.

Returns the Integer as an f64 value.

Raises the value to the power of exp.

Returns the absolute value of an Integer.

Returns whether self is a multiple of rhs.

Returns whether the Integer is less than zero.

Returns whether the Integer is greater than zero.

Returns whether the Integer is equal to zero.

Returns an Integer of the value zero.

Returns whether the Integer is equal to one.

Returns an Integer of the value one.

Trait Implementations

impl Clone for Integer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Integer
[src]

Formats the value using the given formatter.

impl Default for Integer
[src]

Returns the "default value" for a type. Read more

impl Eq for Integer
[src]

impl PartialEq for Integer
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Ord for Integer
[src]

This method returns an Ordering between self and other. Read more

impl PartialOrd for Integer
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq<Ratio> for Integer
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Display for Integer
[src]

Formats the value using the given formatter. Read more

impl FromStr for Integer
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

impl Shl<usize> for Integer
[src]

The resulting type after applying the << operator

The method for the << operator

impl<'a> Shl<usize> for &'a Integer
[src]

The resulting type after applying the << operator

The method for the << operator

impl Shr<usize> for Integer
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl<'a> Shr<usize> for &'a Integer
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl Add<Integer> for Integer
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a> Add<&'a Integer> for Integer
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a> Add<Integer> for &'a Integer
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b> Add<&'a Integer> for &'b Integer
[src]

The resulting type after applying the + operator

The method for the + operator

impl Sub<Integer> for Integer
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a> Sub<&'a Integer> for Integer
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a> Sub<Integer> for &'a Integer
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b> Sub<&'a Integer> for &'b Integer
[src]

The resulting type after applying the - operator

The method for the - operator

impl Mul<Integer> for Integer
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a> Mul<&'a Integer> for Integer
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a> Mul<Integer> for &'a Integer
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, 'b> Mul<&'a Integer> for &'b Integer
[src]

The resulting type after applying the * operator

The method for the * operator

impl Div<Integer> for Integer
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a> Div<&'a Integer> for Integer
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a> Div<Integer> for &'a Integer
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, 'b> Div<&'a Integer> for &'b Integer
[src]

The resulting type after applying the / operator

The method for the / operator

impl Rem<Integer> for Integer
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a> Rem<&'a Integer> for Integer
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a> Rem<Integer> for &'a Integer
[src]

The resulting type after applying the % operator

The method for the % operator

impl<'a, 'b> Rem<&'a Integer> for &'b Integer
[src]

The resulting type after applying the % operator

The method for the % operator

impl Neg for Integer
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<'a> Neg for &'a Integer
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl Zero for Integer
[src]

Returns true if self is equal to the additive identity.

Returns the additive identity element of Self, 0. Read more

impl<'a> FromValueRef<'a> for &'a Integer
[src]

Returns the borrowed value

impl FromValue for Integer
[src]

Consumes the Value and returns a Rust value