Enum syntax::ast::Lit_ [−] [src]

pub enum Lit_ {
    LitStr(InternedString, StrStyle),
    LitBinary(Rc<Vec<u8>>),
    LitByte(u8),
    LitChar(char),
    LitInt(u64, LitIntType),
    LitFloat(InternedString, FloatTy),
    LitFloatUnsuffixed(InternedString),
    LitBool(bool),
}
Unstable

Variants

LitStr
Unstable

A string literal ("foo")

LitBinary
Unstable

A byte string (b"foo")

LitByte
Unstable

A byte char (b'f')

LitChar
Unstable

A character literal ('a')

LitInt
Unstable

An integer literal (1u8)

LitFloat
Unstable

A float literal (1f64 or 1E10f64)

LitFloatUnsuffixed
Unstable

A float literal without a suffix (1.0 or 1.0E10)

LitBool
Unstable

A boolean literal

Trait Implementations

Derived Implementations

impl Debug for Lit_

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Hash for Lit_

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Decodable for Lit_

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Lit_, __D>

impl Encodable for Lit_

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S>

impl Eq for Lit_

impl PartialEq for Lit_

fn eq(&self, __arg_0: &Lit_) -> bool

fn ne(&self, __arg_0: &Lit_) -> bool

impl Clone for Lit_

fn clone(&self) -> Lit_

fn clone_from(&mut self, source: &Self)