[][src]Struct rustdoc_types::Item

pub struct Item {
    pub id: Id,
    pub crate_id: u32,
    pub name: Option<String>,
    pub source: Option<Span>,
    pub visibility: Visibility,
    pub docs: Option<String>,
    pub links: HashMap<String, Id>,
    pub attrs: Vec<String>,
    pub deprecation: Option<Deprecation>,
    pub kind: ItemKind,
    pub inner: ItemEnum,
}

Fields

id: Id

The unique identifier of this item. Can be used to find this item in various mappings.

crate_id: u32

This can be used as a key to the external_crates map of Crate to see which crate this item came from.

name: Option<String>

Some items such as impls don't have names.

source: Option<Span>

The source location of this item (absent if it came from a macro expansion or inline assembly).

visibility: Visibility

By default all documented items are public, but you can tell rustdoc to output private items so this field is needed to differentiate.

docs: Option<String>

The full markdown docstring of this item. Absent if there is no documentation at all, Some("") if there is some documentation but it is empty (EG #[doc = ""]).

links: HashMap<String, Id>

This mapping resolves intra-doc links from the docstring to their IDs

attrs: Vec<String>

Stringified versions of the attributes on this item (e.g. "#[inline]")

deprecation: Option<Deprecation>kind: ItemKindinner: ItemEnum

Trait Implementations

impl Clone for Item[src]

impl Debug for Item[src]

impl<'de> Deserialize<'de> for Item[src]

impl PartialEq<Item> for Item[src]

impl Serialize for Item[src]

impl StructuralPartialEq for Item[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.