Enum syn::Lit [] [src]

pub enum Lit {
    Str(StringStrStyle),
    ByteStr(Vec<u8>, StrStyle),
    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]

Write self to the given Tokens. Read more

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 !=.

impl Hash for Lit
[src]

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

Feeds a slice of this type into the state provided.

impl From<String> for Lit
[src]

Performs the conversion.

impl<'a> From<&'a str> for Lit
[src]

Performs the conversion.

impl From<Vec<u8>> for Lit
[src]

Performs the conversion.

impl<'a> From<&'a [u8]> for Lit
[src]

Performs the conversion.

impl From<char> for Lit
[src]

Performs the conversion.

impl From<bool> for Lit
[src]

Performs the conversion.

impl From<isize> for Lit
[src]

Performs the conversion.

impl From<i8> for Lit
[src]

Performs the conversion.

impl From<i16> for Lit
[src]

Performs the conversion.

impl From<i32> for Lit
[src]

Performs the conversion.

impl From<i64> for Lit
[src]

Performs the conversion.

impl From<usize> for Lit
[src]

Performs the conversion.

impl From<u8> for Lit
[src]

Performs the conversion.

impl From<u16> for Lit
[src]

Performs the conversion.

impl From<u32> for Lit
[src]

Performs the conversion.

impl From<u64> for Lit
[src]

Performs the conversion.

impl From<f32> for Lit
[src]

Performs the conversion.

impl From<f64> for Lit
[src]

Performs the conversion.