pub struct Attribute {
pub name: Spanned<String>,
pub args: Vec<Spanned<String>>,
pub span: Span,
}Expand description
An @name or @name(arg, ...) attribute on an item.
Arguments are bare identifiers, not expressions: the two forms the spec uses
are @test(should_panic) and @derive(Copy, Clone), both identifier lists.
Widening this to expressions later is additive; narrowing it would not be.
Fields§
§name: Spanned<String>§args: Vec<Spanned<String>>§span: SpanTrait Implementations§
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