pub struct SymbolId(/* private fields */);Expand description
The canonical, fully qualified identity of a symbol, e.g.
my_crate::net::Client or my_crate::net::Client::connect.
Ids use :: as the separator for every language so projections can treat
them uniformly. They are the join key between the model, the rendered
diagrams and the JSON metadata, so an agent can follow an id from a node in
a diagram straight back to its definition.
Symbols that live outside the analysed codebase (standard library, third
party crates, or anything the frontend could not resolve) still get an id;
they are simply absent from Codebase::symbols
and relations pointing at them carry Confidence::External.
Implementations§
Source§impl SymbolId
impl SymbolId
Sourcepub fn name(&self) -> &str
pub fn name(&self) -> &str
The last :: segment (the short name).
assert_eq!(SymbolId::new("a::b::C").name(), "C");Trait Implementations§
Source§impl<'de> Deserialize<'de> for SymbolId
impl<'de> Deserialize<'de> for SymbolId
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
impl Eq for SymbolId
Source§impl Ord for SymbolId
impl Ord for SymbolId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for SymbolId
impl PartialOrd for SymbolId
impl StructuralPartialEq for SymbolId
Auto Trait Implementations§
impl Freeze for SymbolId
impl RefUnwindSafe for SymbolId
impl Send for SymbolId
impl Sync for SymbolId
impl Unpin for SymbolId
impl UnsafeUnpin for SymbolId
impl UnwindSafe for SymbolId
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