Struct rustdoc::clean::Item
[−]
[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>,
pub deprecation: Option<Deprecation>,
}Unstable (
rustdoc)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: Span
Unstable (
rustdoc)Stringified span
name: Option<String>
Unstable (
rustdoc)Not everything has a name. E.g., impls
attrs: Vec<Attribute>
Unstable (
rustdoc)inner: ItemEnum
Unstable (
rustdoc)visibility: Option<Visibility>
Unstable (
rustdoc)def_id: DefId
Unstable (
rustdoc)stability: Option<Stability>
Unstable (
rustdoc)deprecation: Option<Deprecation>
Unstable (
rustdoc)Methods
impl Item[src]
fn doc_value<'a>(&'a self) -> Option<&'a str>
Unstable (
rustdoc)Finds the doc attribute as a NameValue and returns the corresponding
value found.
fn is_crate(&self) -> bool
fn is_mod(&self) -> bool
fn is_trait(&self) -> bool
fn is_struct(&self) -> bool
fn is_enum(&self) -> bool
fn is_fn(&self) -> bool
fn is_associated_type(&self) -> bool
fn is_associated_const(&self) -> bool
fn is_method(&self) -> bool
fn is_ty_method(&self) -> bool
fn is_stripped(&self) -> bool
fn has_stripped_fields(&self) -> Option<bool>
fn stability_class(&self) -> String
fn stable_since(&self) -> Option<&str>
Trait Implementations
Derived Implementations
impl Debug for Item[src]
impl Decodable for Item[src]
impl Encodable for Item[src]
impl Clone for Item[src]
fn clone(&self) -> Item
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more