Struct rustdoc::clean::ItemUnstable
[-] [+]
[src]
pub struct Item { pub source: Span, pub name: Option<String>, pub attrs: Vec<Attribute>, pub inner: ItemEnum, pub visibility: Option<Visibility>, pub def_id: DefId, pub stability: Option<Stability>, }
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
source | Stringified span |
name | Not everything has a name. E.g., impls |
attrs | |
inner | |
visibility | |
def_id | |
stability |
Methods
impl Item
fn doc_list<'a>(&'a self) -> Option<&'a [Attribute]>
Finds the doc
attribute as a List and returns the list of attributes
nested inside.
fn doc_value<'a>(&'a self) -> Option<&'a str>
Finds the doc
attribute as a NameValue and returns the corresponding
value found.