Trait rustdoc::clean::types::AttributesExt

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

    // Required methods
    fn lists<'a>(&'a self, name: Symbol) -> Self::AttributeIterator<'a>;
    fn iter<'a>(&'a self) -> Self::Attributes<'a>;

    // Provided method
    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

source

type Attributes<'a>: Iterator<Item = &'a Attribute> where Self: 'a

Required Methods§

source

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

source

fn iter<'a>(&'a self) -> Self::Attributes<'a>

Provided Methods§

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl AttributesExt for [(Cow<'_, Attribute>, Option<DefId>)]

§

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

§

type Attributes<'a> = impl Iterator<Item = &'a Attribute> + 'a where Self: 'a

source§

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

source§

fn iter<'a>(&'a self) -> Self::Attributes<'a>

source§

impl AttributesExt for [Attribute]

§

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

§

type Attributes<'a> = impl Iterator<Item = &'a Attribute> + 'a

source§

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

source§

fn iter<'a>(&'a self) -> Self::Attributes<'a>

Implementors§