Struct rustdoc_json_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: 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.
span: 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>
inner: ItemEnum
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
sourcefn 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>,
impl Eq for Item
impl StructuralEq for Item
impl StructuralPartialEq for Item
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 688 bytes