pub struct ProjectMemoryPathResolver { /* private fields */ }Expand description
Explicit first-class Project memory layout.
This resolver is intentionally separate from the legacy path-hash
MemoryPathResolver::project_root(&str): a safe legacy key and a ProjectId
can have the same character shape, so guessing by string format would move
old scopes silently. Assigned-session writes must use this typed resolver;
legacy roots remain read-only migration aliases.
Implementations§
Source§impl ProjectMemoryPathResolver
impl ProjectMemoryPathResolver
pub fn from_data_dir(data_dir: impl Into<PathBuf>) -> Self
pub fn project_home(&self, project_id: &ProjectId) -> PathBuf
pub fn memory_root(&self, project_id: &ProjectId) -> PathBuf
pub fn legacy_read_root(&self, legacy_project_key: &str) -> Result<PathBuf>
Trait Implementations§
Source§impl Clone for ProjectMemoryPathResolver
impl Clone for ProjectMemoryPathResolver
Source§fn clone(&self) -> ProjectMemoryPathResolver
fn clone(&self) -> ProjectMemoryPathResolver
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 moreAuto Trait Implementations§
impl Freeze for ProjectMemoryPathResolver
impl RefUnwindSafe for ProjectMemoryPathResolver
impl Send for ProjectMemoryPathResolver
impl Sync for ProjectMemoryPathResolver
impl Unpin for ProjectMemoryPathResolver
impl UnsafeUnpin for ProjectMemoryPathResolver
impl UnwindSafe for ProjectMemoryPathResolver
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