Struct rustdoc_types::Item
source · pub struct Item {
pub id: Id,
pub crate_id: u32,
pub name: Option<String>,
pub span: Option<Span>,
pub visibility: Visibility,
pub docs: Option<String>,
pub links: HashMap<String, Id>,
pub attrs: Vec<String>,
pub deprecation: Option<Deprecation>,
pub inner: ItemEnum,
}Fields§
§id: IdThe unique identifier of this item. Can be used to find this item in various mappings.
crate_id: u32This 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.
span: Option<Span>The source location of this item (absent if it came from a macro expansion or inline assembly).
visibility: VisibilityBy 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>§inner: ItemEnumTrait Implementations§
source§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for Item
impl PartialEq for Item
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnwindSafe for Item
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)