pub struct Attribute {
pub name: Ident,
pub arg: Option<AttrArg>,
pub span: Span,
}Expand description
An attribute, #[name] or #[name(literal)] (M5a spec 2.2), written
before an item, a struct field, an enum variant, a field of a variant,
or a method. The parser keeps every one it reads; which names exist and
where each may go is the compiler’s resolver’s to check.
Fields§
§name: Ident§arg: Option<AttrArg>What is between the parentheses; None when there are none.
span: SpanFrom # through ].
Trait Implementations§
impl Eq for Attribute
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more