Enum amplify_syn::Error [−][src]
pub enum Error {}Show variants
Parse(Error), NamesDontMatch(String, String), MultipleSingularValues(String), MultipleLiteralValues(String), UnsupportedLiteral(String), SingularAttrRequired(String), ParametrizedAttrRequired(String), AttributeUnknownArgument { attr: String, arg: String, }, ArgTypeProhibited { attr: String, arg: String, }, ArgNumberExceedsMax { attr: String, type_name: String, no: usize, max_no: u8, }, ArgMustNotHaveValue { attr: String, arg: String, }, ArgRequired { attr: String, arg: String, }, ArgNameMustBeIdent, ArgNameMustBeUnique { attr: String, arg: String, }, ArgValueRequired { attr: String, arg: String, }, ArgValueTypeMismatch { attr: String, arg: String, }, ArgValueMustBeLiteral, ArgValueMustBeType, ParametrizedAttrHasNoValue(String), NestedListsNotSupported(String),
Expand description
Errors representing inconsistency in proc macro attribute structure
Variants
Parse(Error)
Parse error from a syn
crate
Names of two merged attributes must match each other
MultipleSingularValues(String)
Singular argument (of form #[attr = ...]
) has multiple occurrences
each assigned value. This is meaningless.
MultipleLiteralValues(String)
Multiple literal non-string values are given for a parametrized
attribute in form of #[attr(literal1, literal2)]
. This is
meaningless.
UnsupportedLiteral(String)
Attribute contains unsupported literal argument
SingularAttrRequired(String)
Attribute must be in a singular form (#[attr]
or #[attr = ...]
)
ParametrizedAttrRequired(String)
Attribute must be in a parametrized form (#[attr(...)]
)
Attribute has an unknown argument
Attribute is not allowed to have argument of type arg
Number of arg
arguments in attribute attr
exceeds maximum
Show fields
Attribute argument arg
must not have a value
Attribute must has an arg
argument
Attribute or attribute argument name (in form of #[attr(arg = ...)]
)
must be an identifier (like arg
) and not a path (like std::io
)
The same argument name is used multiple times within parametrized
attribute (like in #[attr(name1 = value1, name1 = value2)]
)
Attribute or attribute argument must has a value:
#[attr(arg = value)]
Attribute value type mismatch
Parametrized attribute argument must have a literal value (string,
integer etc): #[attr(arg = "value")]
or #[arg = 4]
Parametrized attribute argument must be a valid type name:
#[attr(arg = u8)]
or #[arg = String]
ParametrizedAttrHasNoValue(String)
Parametrized attribute (in form of #[attr(...)]
) does not
have a single value
NestedListsNotSupported(String)
This error variant is not used anymore after the introduction of custom attribute parser
Lists nested within attribute arguments, like #[attr(arg(...))]
are not supported
Trait Implementations
impl Error for Error
[src]
impl Error for Error
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl From<Infallible> for Error
[src]
impl From<Infallible> for Error
[src]fn from(_: Infallible) -> Self
[src]
fn from(_: Infallible) -> Self
[src]Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more