[][src]Enum syn::Lit

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

Str(StringStrStyle)

A string literal ("foo")

ByteStr(Vec<u8>, StrStyle)

A byte string (b"foo")

Byte(u8)

A byte char (b'f')

Char(char)

A character literal ('a')

Int(u64IntTy)

An integer literal (1)

Float(StringFloatTy)

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

Bool(bool)

A boolean literal

Trait Implementations

impl From<String> for Lit[src]

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

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

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

impl From<char> for Lit[src]

impl From<bool> for Lit[src]

impl From<isize> for Lit[src]

impl From<i8> for Lit[src]

impl From<i16> for Lit[src]

impl From<i32> for Lit[src]

impl From<i64> for Lit[src]

impl From<usize> for Lit[src]

impl From<u8> for Lit[src]

impl From<u16> for Lit[src]

impl From<u32> for Lit[src]

impl From<u64> for Lit[src]

impl From<f32> for Lit[src]

impl From<f64> for Lit[src]

impl Clone for Lit[src]

impl Eq for Lit[src]

impl PartialEq<Lit> for Lit[src]

impl Debug for Lit[src]

impl Hash for Lit[src]

impl StructuralPartialEq for Lit[src]

impl StructuralEq for Lit[src]

impl ToTokens for Lit[src]

Auto Trait Implementations

impl Send for Lit

impl Sync for Lit

impl Unpin for Lit

impl UnwindSafe for Lit

impl RefUnwindSafe for Lit

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]