[−][src]Struct rustdoc::clean::types::Item
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: SpanStringified span
name: Option<String>Not everything has a name. E.g., impls
attrs: Attributesvisibility: Visibilitykind: ItemKinddef_id: DefIdstability: Option<Stability>deprecation: Option<Deprecation>Implementations
impl Item[src]
pub(crate) fn doc_value(&self) -> Option<&str>[src]
Finds the doc attribute as a NameValue and returns the corresponding
value found.
pub fn from_hir_id_and_parts(
hir_id: HirId,
name: Option<Symbol>,
kind: ItemKind,
cx: &DocContext<'_>
) -> Item[src]
hir_id: HirId,
name: Option<Symbol>,
kind: ItemKind,
cx: &DocContext<'_>
) -> Item
Convenience wrapper around Self::from_def_id_and_parts which converts
hir_id to a DefId
pub fn from_def_id_and_parts(
def_id: DefId,
name: Option<Symbol>,
kind: ItemKind,
cx: &DocContext<'_>
) -> Item[src]
def_id: DefId,
name: Option<Symbol>,
kind: ItemKind,
cx: &DocContext<'_>
) -> Item
pub(crate) fn collapsed_doc_value(&self) -> Option<String>[src]
Finds all doc attributes as NameValues and returns their corresponding values, joined
with newlines.
pub(crate) fn links(&self) -> Vec<RenderedLink>[src]
pub(crate) fn is_crate(&self) -> bool[src]
pub(crate) fn is_mod(&self) -> bool[src]
pub(crate) fn is_trait(&self) -> bool[src]
pub(crate) fn is_struct(&self) -> bool[src]
pub(crate) fn is_enum(&self) -> bool[src]
pub(crate) fn is_variant(&self) -> bool[src]
pub(crate) fn is_associated_type(&self) -> bool[src]
pub(crate) fn is_associated_const(&self) -> bool[src]
pub(crate) fn is_method(&self) -> bool[src]
pub(crate) fn is_ty_method(&self) -> bool[src]
pub(crate) fn is_typedef(&self) -> bool[src]
pub(crate) fn is_primitive(&self) -> bool[src]
pub(crate) fn is_union(&self) -> bool[src]
pub(crate) fn is_import(&self) -> bool[src]
pub(crate) fn is_extern_crate(&self) -> bool[src]
pub(crate) fn is_keyword(&self) -> bool[src]
pub(crate) fn is_stripped(&self) -> bool[src]
pub(crate) fn has_stripped_fields(&self) -> Option<bool>[src]
pub(crate) fn stability_class(&self) -> Option<String>[src]
pub(crate) fn stable_since(&self) -> Option<SymbolStr>[src]
pub(crate) fn is_non_exhaustive(&self) -> bool[src]
pub(crate) fn type_(&self) -> ItemType[src]
Returns a documentation-level item type from the item.
pub(crate) fn is_default(&self) -> bool[src]
pub(crate) fn is_fake(&self) -> bool[src]
See comments on next_def_id
Trait Implementations
impl<'_> Clean<Item> for Module<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for Function<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for Union<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for Enum<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for Variant<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl Clean<Item> for VariantDef[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for Typedef<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for OpaqueTy<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for Static<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for Constant<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for ForeignItem<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl Clean<Item> for Macro[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for Trait<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl Clean<Item> for ProcMacro[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for TraitAlias<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for TraitItem<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for ImplItem<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl Clean<Item> for AssocItem[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for StructField<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl Clean<Item> for FieldDef[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl<'_> Clean<Item> for Struct<'_>[src]
pub(crate) fn clean(&self, cx: &DocContext<'_>) -> Item[src]
impl Clone for Item[src]
impl Debug for Item[src]
impl<'a> From<&'a Item> for ItemType[src]
Auto Trait Implementations
impl !RefUnwindSafe for Item
impl !Send for Item
impl !Sync for Item
impl Unpin for Item
impl !UnwindSafe for Item
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,