pub struct IDMap { /* private fields */ }
Expand description
This is usually used behind a shared reference.
For owned version, use CrateDoc
instead.
Implementations§
Source§impl IDMap
DModule related.
impl IDMap
DModule related.
Sourcepub fn dmodule_show_prettier(&self) -> DocTree
pub fn dmodule_show_prettier(&self) -> DocTree
FIXME: show_prettier should be renamed
Sourcepub fn dmodule_item_tree(&self) -> DocTree
pub fn dmodule_item_tree(&self) -> DocTree
This is the default tree view for most cases.
Source§impl IDMap
Get the shortest item name only based on IndexMap.
impl IDMap
Get the shortest item name only based on IndexMap.
pub fn get_item(&self, id: &str) -> Option<&Item>
Sourcepub fn name<S>(&self, id: &S) -> XString
pub fn name<S>(&self, id: &S) -> XString
- If the id refers to an Item with a name, use the name;
- if name is None, try getting the name depending on item type (reexported local items may hit this);
- If id isn’t in IndexMap, try searching the PathMap for last path component (reexported external items may hit this);
- otherwise id.
Source§impl IDMap
Get the external item path only based on PathMap.
impl IDMap
Get the external item path only based on PathMap.
pub fn get_path(&self, id: &str) -> Option<&ItemSummary>
Sourcepub fn path_with_kind_check<S, K>(&self, id: &S, kind: K) -> XString
pub fn path_with_kind_check<S, K>(&self, id: &S, kind: K) -> XString
Like path
, but with strict item kind checking.
If the id doesn’t refer to an ItemSummary with exact given kind, emit a warn.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IDMap
impl<'de> Deserialize<'de> for IDMap
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl !Freeze for IDMap
impl !RefUnwindSafe for IDMap
impl Send for IDMap
impl !Sync for IDMap
impl Unpin for IDMap
impl UnwindSafe for IDMap
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more