Struct lib::NumeralSystem[][src]

pub struct NumeralSystem { /* fields omitted */ }

Define a numeral system by enumerating all the digits. The first digit is zero. The radix is equal to the number of digits. One digit can have any number of characters but all digits must have the same length.

Methods

impl NumeralSystem
[src]

Returns new numeral system from the strings given. If several vecs are given to the function, figits will be made by a combination of all vecs.

  • Exemple for decimal system entry must be vec!(vec!("0", "1", "2", "3", "4", "5", "6", "7", "8", "9"))

Same as ::new but from vec of strings.

Returns pre-defined numeral systems :

  • dec for decimal
  • hex for hexadecimal
  • bibi for "bibi" as defined by Boby Lapointe
  • bin for binary
  • budu for a test system easy to read
  • utf8 for a test system with UTF8 characters
  • base58 for base58 as used in bitcoin

Returns the digit at the position usize

Returns the legth of a digit (all digits have the same length)

Return the radix of this numeral system (= number of digits in numeral system)

Trait Implementations

impl Debug for NumeralSystem
[src]

Formats the value using the given formatter. Read more

impl Display for NumeralSystem
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for NumeralSystem

impl Sync for NumeralSystem