pub struct EntityId(pub String);Expand description
SCIP-style globally unique identifier for any code entity.
Format: scip:<manager>/<package>/<version>/<path>#<symbol>
The string encoding ensures files can be re-indexed independently.
Tuple Fields§
§0: StringImplementations§
Source§impl EntityId
impl EntityId
Sourcepub fn new(
manager: &str,
package: &str,
version: &str,
path: &str,
symbol: &str,
) -> Self
pub fn new( manager: &str, package: &str, version: &str, path: &str, symbol: &str, ) -> Self
Create a new SCIP-style entity ID.
§Arguments
manager- Package manager (e.g., “npm”, “pip”, “cargo”, “local”)package- Package name (e.g., “my-app”)version- Version string (e.g., “1.0.0”)path- File path relative to package rootsymbol- Symbol name within the file (function, class, etc.)
Sourcepub fn local(path: &str, symbol: &str) -> Self
pub fn local(path: &str, symbol: &str) -> Self
Create a simple local entity ID (for single-project analysis).
Sourcepub fn symbol_name(&self) -> Option<&str>
pub fn symbol_name(&self) -> Option<&str>
Extract the symbol name from the SCIP ID.
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl<'de> Deserialize<'de> for EntityId
impl<'de> Deserialize<'de> for EntityId
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 EntityId
impl StructuralPartialEq for EntityId
Auto Trait Implementations§
impl Freeze for EntityId
impl RefUnwindSafe for EntityId
impl Send for EntityId
impl Sync for EntityId
impl Unpin for EntityId
impl UnsafeUnpin for EntityId
impl UnwindSafe for EntityId
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.