[−][src]Enum amplify_derive_helpers::Attr
Structure representing internal structure of collected instances of a proc
macro attribute having some specific name (accessible via Attr::name()
).
Variants
Singular(SingularAttr)
Attribute of #[attr]
or #[attr = value]
form, which, aside from the
case where value
is a string literal, may have only a single
occurrence (string literals are concatenated into a single value like
rust compiler does for #[doc = "..."]
attributes).
Parametrized(ParametrizedAttr)
Parametrized attribute in form of #[attr(...)]
, where parameters are
gathered from all attribute occurrences.
Implementations
impl Attr
[src]
pub fn singular_or_err(self) -> Result<SingularAttr, Error>
[src]
pub fn parametrized_or_err(self) -> Result<ParametrizedAttr, Error>
[src]
pub fn name(&self) -> Ident
[src]
pub fn value(&self) -> Result<ArgValue, Error>
[src]
pub fn literal_value(&self) -> Result<Lit, Error>
[src]
pub fn type_value(&self) -> Result<Type, Error>
[src]
pub fn with_attribute(attr: &Attribute) -> Result<Self, Error>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Attr
[src]
impl !Send for Attr
[src]
impl !Sync for Attr
[src]
impl Unpin for Attr
[src]
impl UnwindSafe for Attr
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,