Struct literalext::IntLit
[−]
[src]
pub struct IntLit { /* fields omitted */ }
A type which represents an integer literal.
Methods
impl IntLit
[src]
fn suffix(&self) -> &str
Get the suffix written on the integer literal.
fn as_u8(&self) -> Option<u8>
Returns None
if the value overflows, or if the suffix is wrong.
fn as_i8(&self) -> Option<i8>
Returns None
if the value overflows, or if the suffix is wrong.
fn as_u16(&self) -> Option<u16>
Returns None
if the value overflows, or if the suffix is wrong.
fn as_i16(&self) -> Option<i16>
Returns None
if the value overflows, or if the suffix is wrong.
fn as_u32(&self) -> Option<u32>
Returns None
if the value overflows, or if the suffix is wrong.
fn as_i32(&self) -> Option<i32>
Returns None
if the value overflows, or if the suffix is wrong.
fn as_u64(&self) -> Option<u64>
Returns None
if the value overflows, or if the suffix is wrong.
fn as_i64(&self) -> Option<i64>
Returns None
if the value overflows, or if the suffix is wrong.
Trait Implementations
impl Debug for IntLit
[src]
impl Copy for IntLit
[src]
impl Clone for IntLit
[src]
fn clone(&self) -> IntLit
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more