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

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

Blanket Implementations

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

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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

Performs the conversion.

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Important traits for &'a mut R

Immutably borrows from an owned value. Read more

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

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

The type returned in the event of a conversion error.

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

Performs the conversion.

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

Important traits for &'a mut R

Mutably borrows from an owned value. Read more

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[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<T> Decodable for T where
    T: UseSpecializedDecodable
[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<E> SpecializationError for E
[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?

Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S is the encoder/decoder state type, T is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more

impl<T> Erased for T
[src]

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

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

impl<T> Erased for T

impl<T> MaybeResult for T
[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?

🔬 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<'a, T> Captures for T where
    T: ?Sized
[src]