Enum cluatoi::AtoiErr
[−]
[src]
pub enum AtoiErr { Overflow, ByteUnk(u8), }
Result trait Atoi
Variants
Overflow
Overflow of number.
assert_eq!(u8::atoi(b"256"), Result::Err(AtoiErr::Overflow)); assert_eq!(u16::atoi(b"65536"), Result::Err(AtoiErr::Overflow)); assert_eq!(u32::atoi(b"4294967296"), Result::Err(AtoiErr::Overflow)); assert_eq!(u64::atoi(b"18446744073709551616"), Result::Err(AtoiErr::Overflow));
ByteUnk(u8)
In the byte sequence, an unknown character was used.
assert_eq!(u8::atoi(b"-128"), Result::Err(AtoiErr::ByteUnk(b'-'))); assert_eq!(u16::atoi(b"-128"), Result::Err(AtoiErr::ByteUnk(b'-'))); assert_eq!(u32::atoi(b"-128"), Result::Err(AtoiErr::ByteUnk(b'-'))); assert_eq!(u64::atoi(b"-128"), Result::Err(AtoiErr::ByteUnk(b'-'))); assert_eq!(u8::atoi(b"128U"), Result::Err(AtoiErr::ByteUnk(b'U'))); assert_eq!(u16::atoi(b"128L"), Result::Err(AtoiErr::ByteUnk(b'L'))); assert_eq!(u32::atoi(b"128I"), Result::Err(AtoiErr::ByteUnk(b'I'))); assert_eq!(u64::atoi(b"128N"), Result::Err(AtoiErr::ByteUnk(b'N')));
Trait Implementations
impl Debug for AtoiErr
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for AtoiErr
[src]
fn eq(&self, __arg_0: &AtoiErr) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &AtoiErr) -> bool
[src]
This method tests for !=
.