pub struct SymbolRef {
pub id: SymbolId,
pub path: SymbolPath,
}Expand description
Unified symbol reference with ID and Path
This is the standard format for displaying symbols with both their internal ID and human-readable path.
§Format
SymbolId(2v1)@simple_jq2::Filter§Why this format?
- ID first: enables quick lookup/copy
@separator: visually distinct, not valid in Rust paths- Path second: provides context for humans
Fields§
§id: SymbolIdInternal symbol ID
path: SymbolPathHuman-readable symbol path
Implementations§
Source§impl SymbolRef
impl SymbolRef
Sourcepub fn new(id: SymbolId, path: SymbolPath) -> SymbolRef
pub fn new(id: SymbolId, path: SymbolPath) -> SymbolRef
Create a new SymbolRef
Sourcepub fn path(&self) -> &SymbolPath
pub fn path(&self) -> &SymbolPath
Get the symbol path
Sourcepub fn crate_name(&self) -> &str
pub fn crate_name(&self) -> &str
Get the crate name
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SymbolRef
impl<'de> Deserialize<'de> for SymbolRef
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SymbolRef, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SymbolRef, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for SymbolRef
impl Serialize for SymbolRef
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for SymbolRef
impl StructuralPartialEq for SymbolRef
Auto Trait Implementations§
impl Freeze for SymbolRef
impl RefUnwindSafe for SymbolRef
impl Send for SymbolRef
impl Sync for SymbolRef
impl Unpin for SymbolRef
impl UnsafeUnpin for SymbolRef
impl UnwindSafe for SymbolRef
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more