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.
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)
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static