pub struct StoreRef { /* private fields */ }Expand description
How the config an install writes names the store.
A project install writes --auto, not a path. The MCP entry, the three
settings hooks and the three git hook blocks then resolve the store when
they run — $CLAUDE_PROJECT_DIR/mushroom-memory, else mushroom-memory at
the root of the working tree they were run in.
The reason is git worktree. Those config files live in the repository and
get committed, so an absolute path baked into them follows a new worktree
across and points every hook there at the other checkout’s store: the
graph then describes files that are not the ones being edited. Resolving at
run time gives each working tree its own store, which is the only answer
that is right in both checkouts.
--db <path> opts out and pins an absolute path; user scope always pins
~/.mushroomdb/memory, since --auto inside any checkout would resolve to
that project instead.
Implementations§
Source§impl StoreRef
impl StoreRef
Sourcepub fn auto(path: impl Into<PathBuf>) -> Self
pub fn auto(path: impl Into<PathBuf>) -> Self
A store the config names --auto, living at path for this checkout.
Trait Implementations§
impl Eq for StoreRef
impl StructuralPartialEq for StoreRef
Auto Trait Implementations§
impl Freeze for StoreRef
impl RefUnwindSafe for StoreRef
impl Send for StoreRef
impl Sync for StoreRef
impl Unpin for StoreRef
impl UnsafeUnpin for StoreRef
impl UnwindSafe for StoreRef
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.