Enum amplify_syn::LiteralClass[][src]

pub enum LiteralClass {
    Str,
    ByteStr,
    Byte,
    Char,
    Int,
    Float,
    Bool,
    Verbatim,
}

Constrains for literal value type

Variants

Str

Literal must be a string

ByteStr

Literal must be a byte string

Byte

Literal must be a byte (in form of b'f')

Char

Literal must be a character

Int

Literal must be an integer

Float

Literal must be a float

Bool

Literal must be a boolean

Verbatim

Literal must be a verbatim form

Implementations

impl LiteralClass[src]

pub fn check(
    self,
    lit: &Lit,
    attr: impl ToString,
    arg: impl ToString
) -> Result<(), Error>
[src]

Checks the literal against current requirements, generating Error if the requirements are not met.

Trait Implementations

impl Clone for LiteralClass[src]

impl Copy for LiteralClass[src]

impl Debug for LiteralClass[src]

impl Eq for LiteralClass[src]

impl From<&'_ Lit> for LiteralClass[src]

impl From<Lit> for LiteralClass[src]

impl Hash for LiteralClass[src]

impl Ord for LiteralClass[src]

impl PartialEq<LiteralClass> for LiteralClass[src]

impl PartialOrd<LiteralClass> for LiteralClass[src]

impl StructuralEq for LiteralClass[src]

impl StructuralPartialEq for LiteralClass[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.