[][src]Enum amplify_derive_helpers::Error

pub enum Error {
    Parse(String),
    NamesDontMatch(IdentIdent),
    MultipleSingularValues(Ident),
    MultipleLiteralValues(Ident),
    SingularAttrRequired(Ident),
    ParametrizedAttrRequired(Ident),
    ArgMustBePath,
    ArgNameRequired,
    ArgNameMustBeIdent,
    ArgNameMustBeUnique(Ident),
    ArgValueRequired(Ident),
    ArgValueMustBeLiteral,
    ArgValueMustBeType,
    ParametrizedAttrHasNoValue(Ident),
    NamedArgRequired(String),
    NestedListsNotSupported(Ident),
}

Errors representing inconsistency in proc macro attribute structure

Variants

Parse(String)
NamesDontMatch(IdentIdent)

Names of two merged attributes must match each other

MultipleSingularValues(Ident)

Singular argument (of form #[attr = ...]) has multiple occurrences each assigned value. This is meaningless.

MultipleLiteralValues(Ident)

Multiple literal non-string values are given for a parametrized attribute in form of #[attr(literal1, literal2)]. This is meaningless.

SingularAttrRequired(Ident)

Attribute must be in a singular form (#[attr] or #[attr = ...])

ParametrizedAttrRequired(Ident)

Attribute must be in a parametrized form (#[attr(...)])

ArgMustBePath

Attribute argument must be a path identifier like #[attr(std::io)] or #[attr = std::io]

ArgNameRequired

Attribute or attribute argument must has a name

ArgNameMustBeIdent

Attribute or attribute argument name (in form of #[attr(arg = ...)]) must be an identifier (like arg) and not a path (like std::io)

ArgNameMustBeUnique(Ident)

The same argument name is used multiple times within parametrized attribute (like in #[attr(name1 = value1, name1 = value2)])

ArgValueRequired(Ident)

Attribute or attribute argument must has a value: #[attr(arg = value)]

ArgValueMustBeLiteral

Parametrized attribute argument must have a literal value (string, integer etc): #[attr(arg = "value")] or #[arg = 4]

ArgValueMustBeType

Parametrized attribute argument must be a valid type name: #[attr(arg = u8)] or #[arg = String]

ParametrizedAttrHasNoValue(Ident)

Parametrized attribute (in form of #[attr(...)]) does not have a single value

NamedArgRequired(String)

Attribute named argument must be present

NestedListsNotSupported(Ident)

Lists nested within attribute arguments, like #[attr(arg(...))] are not supported

Trait Implementations

impl Clone for Error[src]

impl Debug for Error[src]

impl Display for Error[src]

impl Eq for Error[src]

impl Error for Error[src]

impl From<Error> for Error[src]

impl Hash for Error[src]

impl PartialEq<Error> for Error[src]

impl StructuralEq for Error[src]

impl StructuralPartialEq for Error[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> ToString for T where
    T: Display + ?Sized
[src]

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.