pub struct ItemSummary {
    pub crate_id: u32,
    pub path: Vec<String>,
    pub kind: ItemKind,
}
Expand description

For external (not defined in the local crate) items, you don’t get the same level of information. This struct should contain enough to generate a link/reference to the item in question, or can be used by a tool that takes the json output of multiple crates to find the actual item definition with all the relevant info.

Fields§

§crate_id: u32

Can be used to look up the name and html_root_url of the crate this item came from in the external_crates map.

§path: Vec<String>

The list of path components for the fully qualified path of this item (e.g. ["std", "io", "lazy", "Lazy"] for std::io::lazy::Lazy).

Note that items can appear in multiple paths, and the one chosen is implementation defined. Currently, this is the full path to where the item was defined. Eg String is currently ["alloc", "string", "String"] and HashMap is ["std", "collections", "hash", "map", "HashMap"], but this is subject to change.

§kind: ItemKind

Whether this item is a struct, trait, macro, etc.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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: 32 bytes