Struct rustdoc::clean::Item[][src]

pub struct Item {
    pub source: Span,
    pub name: Option<String>,
    pub attrs: Attributes,
    pub inner: ItemEnum,
    pub visibility: Option<Visibility>,
    pub def_id: DefId,
    pub stability: Option<Stability>,
    pub deprecation: Option<Deprecation>,
}

Anything with a source location and set of attributes and, optionally, a name. That is, anything that can be documented. This doesn't correspond directly to the AST's concept of an item; it's a strict superset.

Fields

Stringified span

Not everything has a name. E.g., impls

Methods

impl Item
[src]

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

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

Returns a documentation-level item type from the item.

Trait Implementations

impl Clone for Item
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Encodable for Item
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

impl Decodable for Item
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

impl Debug for Item
[src]

Formats the value using the given formatter. Read more

impl Clean<Item> for Module
[src]

impl Clean<Item> for Function
[src]

impl Clean<Item> for Trait
[src]

impl Clean<Item> for TraitItem
[src]

impl Clean<Item> for ImplItem
[src]

impl<'tcx> Clean<Item> for AssociatedItem
[src]

impl Clean<Item> for StructField
[src]

impl<'tcx> Clean<Item> for FieldDef
[src]

impl Clean<Item> for Variant
[src]

impl<'tcx> Clean<Item> for VariantDef
[src]

impl Clean<Item> for Typedef
[src]

impl Clean<Item> for Existential
[src]

impl Clean<Item> for Static
[src]

impl Clean<Item> for Constant
[src]

impl Clean<Item> for ExternCrate
[src]

impl Clean<Item> for ForeignItem
[src]

impl Clean<Item> for Macro
[src]

impl<'a> From<&'a Item> for ItemType
[src]

Performs the conversion.

Auto Trait Implementations

impl !Send for Item

impl !Sync for Item