pub struct AttrItem {
pub path: Path,
pub args: MacArgs,
pub tokens: Option<LazyTokenStream>,
}
Fields
path: Path
args: MacArgs
tokens: Option<LazyTokenStream>
Implementations
Trait Implementations
sourceimpl HasAttrs for AttrItem
impl HasAttrs for AttrItem
sourceconst SUPPORTS_CUSTOM_INNER_ATTRS: bool = false
const SUPPORTS_CUSTOM_INNER_ATTRS: bool = false
This is true
if this HasAttrs
might support ‘custom’ (proc-macro) inner
attributes. Attributes like #![cfg]
and #![cfg_attr]
are not
considered ‘custom’ attributes. Read more
fn attrs(&self) -> &[Attribute]
fn visit_attrs(&mut self, _f: impl FnOnce(&mut Vec<Attribute>))
sourceimpl HasTokens for AttrItem
impl HasTokens for AttrItem
fn tokens(&self) -> Option<&LazyTokenStream>
fn tokens_mut(&mut self) -> Option<&mut Option<LazyTokenStream>>
sourceimpl<__CTX> HashStable<__CTX> for AttrItem where
__CTX: HashStableContext,
impl<__CTX> HashStable<__CTX> for AttrItem where
__CTX: HashStableContext,
fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)
Auto Trait Implementations
impl !RefUnwindSafe for AttrItem
impl !Send for AttrItem
impl !Sync for AttrItem
impl Unpin for AttrItem
impl !UnwindSafe for AttrItem
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 120 bytes