pub struct MemzPaths {
pub data_dir: PathBuf,
}Expand description
Resolved filesystem paths for a memz store.
Fields§
§data_dir: PathBufImplementations§
Source§impl MemzPaths
impl MemzPaths
Sourcepub fn builder(&self, session_id: impl Into<String>) -> MemzBuilder
pub fn builder(&self, session_id: impl Into<String>) -> MemzBuilder
Start a MemzBuilder rooted at this data directory.
Source§impl MemzPaths
impl MemzPaths
pub fn new(data_dir: impl AsRef<Path>) -> Self
Sourcepub fn project_local() -> Self
pub fn project_local() -> Self
Project-local default: ./.memz
pub fn data_dir(&self) -> &Path
pub fn db_path(&self) -> PathBuf
pub fn db_path_string(&self) -> String
pub fn exists(&self) -> bool
Sourcepub fn config(&self, session_id: impl Into<String>) -> MemzConfig
pub fn config(&self, session_id: impl Into<String>) -> MemzConfig
Build a MemzConfig for this location.
Sourcepub fn open(&self, session_id: impl Into<String>, embed: EmbedFn) -> MemoryStore
pub fn open(&self, session_id: impl Into<String>, embed: EmbedFn) -> MemoryStore
Open a MemoryStore at this location with the given embedder.
Trait Implementations§
impl Eq for MemzPaths
impl StructuralPartialEq for MemzPaths
Auto Trait Implementations§
impl Freeze for MemzPaths
impl RefUnwindSafe for MemzPaths
impl Send for MemzPaths
impl Sync for MemzPaths
impl Unpin for MemzPaths
impl UnsafeUnpin for MemzPaths
impl UnwindSafe for MemzPaths
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
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more