pub struct ProjectKey(/* private fields */);Expand description
Stable encoding of a project’s workspace path (mirrors ~/.claude/projects/<key>).
Implementations§
Source§impl ProjectKey
impl ProjectKey
Sourcepub fn from_workspace(workspace: &Path) -> Self
pub fn from_workspace(workspace: &Path) -> Self
Derive a filesystem-safe key from a workspace path. Deterministic.
The path is canonicalized when possible (so symlinks/relative spellings
of the same workspace agree), then folded to a readable slug PLUS a
short hash of the exact path — the hash disambiguates paths whose
folded forms collide (/a/b vs /a-b).
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl Clone for ProjectKey
impl Clone for ProjectKey
Source§fn clone(&self) -> ProjectKey
fn clone(&self) -> ProjectKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProjectKey
impl Debug for ProjectKey
impl Eq for ProjectKey
Source§impl PartialEq for ProjectKey
impl PartialEq for ProjectKey
Source§fn eq(&self, other: &ProjectKey) -> bool
fn eq(&self, other: &ProjectKey) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ProjectKey
Auto Trait Implementations§
impl Freeze for ProjectKey
impl RefUnwindSafe for ProjectKey
impl Send for ProjectKey
impl Sync for ProjectKey
impl Unpin for ProjectKey
impl UnsafeUnpin for ProjectKey
impl UnwindSafe for ProjectKey
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