Struct apint::Radix
[−]
[src]
pub struct Radix(_);
A radix for parsing strings as ApInt
s.
A radix represents the range of valid input characters that represent values
of the to-be-parsed ApInt
.
Supported radices range from binary radix (2
) up
to full case-insensitive alphabet and numerals (36
).
Examples
- The binary 2-radix supports only
0
and1
as input. - The decimal 10-radix supports
0
,1
,...9
as input characters. - The hex-dec 16-radix supports inputs characters within
0
,..,9
anda
,..,f
.
Methods
impl Radix
[src]
fn new(radix: u8) -> Result<Radix>
[src]
Create a new Radix
from the given u8
.
Errors
- If the given value is not within the valid radix range of
2..36
.
fn to_u8(self) -> u8
[src]
Returns the u8
representation of this Radix
.
Trait Implementations
impl Debug for Radix
[src]
impl Copy for Radix
[src]
impl Clone for Radix
[src]
fn clone(&self) -> Radix
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Radix
[src]
fn eq(&self, __arg_0: &Radix) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Radix) -> bool
[src]
This method tests for !=
.
impl Eq for Radix
[src]
impl Hash for Radix
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more