Enum amplify_syn::ValueClass[][src]

pub enum ValueClass {

Constrains for attribute value type



The value must be a literal matching given literal constraints (see [ConstrainedLit])


The value must be of a native rust type matching given type constraints (see [ConstrainedType])


impl ValueClass[src]

pub fn str() -> ValueClass[src]

Convenience constructor creating ValueClass::Literal(LiteralClass::Str)

pub fn byte_str() -> ValueClass[src]

Convenience constructor creating ValueClass::Literal(LiteralClass::ByteStr)

pub fn byte() -> ValueClass[src]

Convenience constructor creating ValueClass::Literal(LiteralClass::Byte)

pub fn int() -> ValueClass[src]

Convenience constructor creating ValueClass::Literal(LiteralClass::Int)

pub fn float() -> ValueClass[src]

Convenience constructor creating ValueClass::Literal(LiteralClass::Float)

pub fn char() -> ValueClass[src]

Convenience constructor creating ValueClass::Literal(LiteralClass::Char)

pub fn bool() -> ValueClass[src]

Convenience constructor creating ValueClass::Literal(LiteralClass::Bool)

impl ValueClass[src]

pub fn check(
    value: &ArgValue,
    attr: impl ToString,
    arg: impl ToString
) -> Result<(), Error>

Checks the value against value class requirements, generating Error if the requirements are not met.

Trait Implementations

impl Clone for ValueClass[src]

impl Copy for ValueClass[src]

impl Debug for ValueClass[src]

impl Eq for ValueClass[src]

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

impl From<&'_ Type> for ValueClass[src]

impl From<Lit> for ValueClass[src]

impl From<Type> for ValueClass[src]

impl Hash for ValueClass[src]

impl Ord for ValueClass[src]

impl PartialEq<ValueClass> for ValueClass[src]

impl PartialOrd<ValueClass> for ValueClass[src]

impl StructuralEq for ValueClass[src]

impl StructuralPartialEq for ValueClass[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.