[−][src]Struct rustdoc::clean::types::Attributes

pub(crate) struct Attributes {
    pub(crate) doc_strings: Vec<DocFragment>,
    pub(crate) other_attrs: Vec<Attribute>,
    pub(crate) cfg: Option<Arc<Cfg>>,
    pub(crate) span: Option<Span>,
    pub(crate) links: Vec<ItemLink>,
    pub(crate) inner_docs: bool,
}

Fields

doc_strings: Vec<DocFragment>other_attrs: Vec<Attribute>cfg: Option<Arc<Cfg>>span: Option<Span>links: Vec<ItemLink>

map from Rust paths to resolved defs and potential URL fragments

inner_docs: bool

Implementations

impl Attributes[src]

pub(crate) fn extract_cfg(mi: &MetaItem) -> Option<&MetaItem>[src]

Extracts the content from an attribute #[doc(cfg(content))].

pub(crate) fn extract_include(mi: &MetaItem) -> Option<(String, String)>[src]

Reads a MetaItem from within an attribute, looks for whether it is a #[doc(include="file")], and returns the filename and contents of the file as loaded from its expansion.

pub(crate) fn has_doc_flag(&self, flag: Symbol) -> bool[src]

pub(crate) fn from_ast(
    diagnostic: &Handler,
    attrs: &[Attribute],
    additional_attrs: Option<(&[Attribute], DefId)>
) -> Attributes
[src]

pub(crate) fn doc_value(&self) -> Option<&str>[src]

Finds the doc attribute as a NameValue and returns the corresponding value found.

pub(crate) fn collapsed_doc_value(&self) -> Option<String>[src]

Finds all doc attributes as NameValues and returns their corresponding values, joined with newlines.

Gets links as a vector

Cache must be populated before call

pub(crate) fn get_doc_aliases(&self) -> FxHashSet<String>[src]

impl Attributes[src]

pub(crate) fn collapse_doc_comments(&mut self)[src]

impl Attributes[src]

pub(crate) fn unindent_doc_comments(&mut self)[src]

Trait Implementations

impl AttributesExt for Attributes[src]

impl Clean<Attributes> for [Attribute][src]

impl Clone for Attributes[src]

impl Debug for Attributes[src]

impl Default for Attributes[src]

impl Eq for Attributes[src]

impl Hash for Attributes[src]

impl PartialEq<Attributes> for Attributes[src]

Auto Trait Implementations

impl !RefUnwindSafe for Attributes

impl !Send for Attributes

impl !Sync for Attributes

impl Unpin for Attributes

impl !UnwindSafe for Attributes

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithConstness for T[src]