Struct proc_macro::Literal
[−]
[src]
pub struct Literal(_);
A literal character ('a'
), string ("hello"
), or number (2.3
).
Methods
impl Literal
[src]
pub fn integer(n: i128) -> Literal
[src][−]
Integer literal
pub fn u8(n: u8) -> Literal
[src][−]
Integer literal.
pub fn i8(n: i8) -> Literal
[src][−]
Integer literal.
pub fn u16(n: u16) -> Literal
[src][−]
Integer literal.
pub fn i16(n: i16) -> Literal
[src][−]
Integer literal.
pub fn u32(n: u32) -> Literal
[src][−]
Integer literal.
pub fn i32(n: i32) -> Literal
[src][−]
Integer literal.
pub fn u64(n: u64) -> Literal
[src][−]
Integer literal.
pub fn i64(n: i64) -> Literal
[src][−]
Integer literal.
pub fn usize(n: usize) -> Literal
[src][−]
Integer literal.
pub fn isize(n: isize) -> Literal
[src][−]
Integer literal.
pub fn float(n: f64) -> Literal
[src][−]
Floating point literal.
pub fn f32(n: f32) -> Literal
[src][−]
Floating point literal.
pub fn f64(n: f64) -> Literal
[src][−]
Floating point literal.
pub fn string(string: &str) -> Literal
[src][−]
String literal.
pub fn character(ch: char) -> Literal
[src][−]
Character literal.
pub fn byte_string(bytes: &[u8]) -> Literal
[src][−]
Byte string literal.
Trait Implementations
impl Clone for Literal
[src]
fn clone(&self) -> Literal
[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 Debug for Literal
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src][−]
Formats the value using the given formatter. Read more