Enum radix::RadixNum [−][src]
pub enum RadixNum { // some variants omitted }
A number in some radix.
Methods
impl RadixNum
[src]
impl RadixNum
pub fn from_str(number: &str, radix: usize) -> RadixResult<Self>
[src]
pub fn from_str(number: &str, radix: usize) -> RadixResult<Self>
Convert a number
encoded in a certain radix
to a RadixNum
.
pub fn as_str(&self) -> &str
[src]
pub fn as_str(&self) -> &str
pub fn with_radix(&self, radix: usize) -> RadixResult<Self>
[src]
pub fn with_radix(&self, radix: usize) -> RadixResult<Self>
Change the radix that self
is encoded with. This does not change
the represented value, but it does change its representation.
pub fn radix(&self) -> usize
[src]
pub fn radix(&self) -> usize
Retrieve the radix that self
is encoded with.
pub fn as_decimal(&self) -> RadixResult<usize>
[src]
pub fn as_decimal(&self) -> RadixResult<usize>
pub fn digits<'c>(
&'c self
) -> impl Iterator<Item = char>
[src]
pub fn digits<'c>(
&'c self
) -> impl Iterator<Item = char>
Trait Implementations
impl Clone for RadixNum
[src]
impl Clone for RadixNum
fn clone(&self) -> RadixNum
[src]
fn clone(&self) -> RadixNum
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for RadixNum
[src]
impl Debug for RadixNum
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for RadixNum
[src]
impl PartialEq for RadixNum
fn eq(&self, other: &RadixNum) -> bool
[src]
fn eq(&self, other: &RadixNum) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &RadixNum) -> bool
[src]
fn ne(&self, other: &RadixNum) -> bool
This method tests for !=
.
impl Eq for RadixNum
[src]
impl Eq for RadixNum
impl PartialOrd for RadixNum
[src]
impl PartialOrd for RadixNum
fn partial_cmp(&self, other: &RadixNum) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &RadixNum) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &RadixNum) -> bool
[src]
fn lt(&self, other: &RadixNum) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &RadixNum) -> bool
[src]
fn le(&self, other: &RadixNum) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &RadixNum) -> bool
[src]
fn gt(&self, other: &RadixNum) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &RadixNum) -> bool
[src]
fn ge(&self, other: &RadixNum) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for RadixNum
[src]
impl Ord for RadixNum
fn cmp(&self, other: &RadixNum) -> Ordering
[src]
fn cmp(&self, other: &RadixNum) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl From<usize> for RadixNum
[src]
impl From<usize> for RadixNum
impl From<u8> for RadixNum
[src]
impl From<u8> for RadixNum
impl From<u16> for RadixNum
[src]
impl From<u16> for RadixNum
impl From<u32> for RadixNum
[src]
impl From<u32> for RadixNum
impl From<u64> for RadixNum
[src]
impl From<u64> for RadixNum
impl From<u128> for RadixNum
[src]
impl From<u128> for RadixNum