Enum syn::Lit [] [src]

pub enum Lit {
    Str(StringStrStyle),
    ByteStr(Vec<u8>),
    Byte(u8),
    Char(char),
    Int(u64IntTy),
    Float(StringFloatTy),
    Bool(bool),
}

Literal kind.

E.g. "foo", 42, 12.34 or bool

Variants

A string literal ("foo")

A byte string (b"foo")

A byte char (b'f')

A character literal ('a')

An integer literal (1)

A float literal (1f64 or 1E10f64 or 1.0E10)

A boolean literal

Trait Implementations

impl ToTokens for Lit
[src]

impl Debug for Lit
[src]

Formats the value using the given formatter.

impl Clone for Lit
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Lit
[src]

impl PartialEq for Lit
[src]

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

This method tests for !=.