pub struct Attribute {
pub name: Ident,
pub args: Vec<Expr>,
pub span: Span,
}Expand description
An attribute in [] or [[]], for example [unroll], [numthreads(8, 8, 1)]
or [[vk::binding(0, 1)]].
Fields§
§name: IdentThe attribute’s name. A qualified name keeps its ::, for example vk::binding.
args: Vec<Expr>Its arguments, if it has parentheses.
span: SpanThe whole attribute, with the brackets when it is alone in them. In
[[a, b]], each span covers only the name and the arguments.
Trait Implementations§
impl StructuralPartialEq for Attribute
Auto Trait Implementations§
impl Forget for Attribute
impl Freeze for Attribute
impl Move for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attributewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<Expr>: UnsafeUnpin,
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