rustdoc::clean::types

Trait AttributesExt

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

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

    // Provided method
    fn cfg(
        &self,
        tcx: TyCtxt<'_>,
        hidden_cfg: &FxHashSet<Cfg>,
    ) -> Option<Arc<Cfg>> { ... }
}

Required Associated Types§

source

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

source

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

Required Methods§

source

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

source

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

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>)]

source§

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

source§

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

source§

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

source§

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

source§

impl AttributesExt for [Attribute]

source§

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

source§

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

source§

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

source§

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

Implementors§