Enum syntex_syntax::ast::Lit_ [] [src]

pub enum Lit_ {
    LitStr(InternedStringStrStyle),
    LitByteStr(Rc<Vec<u8>>),
    LitByte(u8),
    LitChar(char),
    LitInt(u64LitIntType),
    LitFloat(InternedStringFloatTy),
    LitFloatUnsuffixed(InternedString),
    LitBool(bool),
}

Variants

LitStr(InternedStringStrStyle)

A string literal ("foo")

LitByteStr(Rc<Vec<u8>>)

A byte string (b"foo")

LitByte(u8)

A byte char (b'f')

LitChar(char)

A character literal ('a')

LitInt(u64LitIntType)

An integer literal (1u8)

LitFloat(InternedStringFloatTy)

A float literal (1f64 or 1E10f64)

LitFloatUnsuffixed(InternedString)

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

LitBool(bool)

A boolean literal

Methods

impl Lit_
[src]

fn is_str(&self) -> bool

Returns true if this literal is a string and false otherwise.

Trait Implementations

impl Debug for Lit_
[src]

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

Formats the value using the given formatter.

impl Hash for Lit_
[src]

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

Feeds this value into the state given, updating the hasher as necessary.

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

Feeds a slice of this type into the state provided.

impl Decodable for Lit_
[src]

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

impl Encodable for Lit_
[src]

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

impl Eq for Lit_
[src]

impl PartialEq for Lit_
[src]

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

This method tests for self and other values to be equal, and is used by ==. Read more

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

This method tests for !=.

impl Clone for Lit_
[src]

fn clone(&self) -> Lit_

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