pub(crate) trait AttributesExt {
    type AttributeIterator<'a>: Iterator<Item = NestedMetaItem>
       where Self: 'a;

    // Required methods
    fn lists<'a>(&'a self, name: Symbol) -> Self::AttributeIterator<'a>;
    fn span(&self) -> Option<Span>;
    fn cfg(
        &self,
        tcx: TyCtxt<'_>,
        hidden_cfg: &FxHashSet<Cfg>
    ) -> Option<Arc<Cfg>>;
}

Required Associated Types§

source

type AttributeIterator<'a>: Iterator<Item = NestedMetaItem> where Self: 'a

Required Methods§

source

fn lists<'a>(&'a self, name: Symbol) -> Self::AttributeIterator<'a>

source

fn span(&self) -> Option<Span>

source

fn cfg(&self, tcx: TyCtxt<'_>, hidden_cfg: &FxHashSet<Cfg>) -> Option<Arc<Cfg>>

Implementations on Foreign Types§

source§

impl AttributesExt for [Attribute]

source§

fn span(&self) -> Option<Span>

Return the span of the first doc-comment, if it exists.

§

type AttributeIterator<'a> = impl Iterator<Item = NestedMetaItem> + 'a

source§

fn lists<'a>(&'a self, name: Symbol) -> Self::AttributeIterator<'a>

source§

fn cfg(&self, tcx: TyCtxt<'_>, hidden_cfg: &FxHashSet<Cfg>) -> Option<Arc<Cfg>>

Implementors§