pub struct FloppyPaths {
pub data_dir: PathBuf,
}Expand description
Resolved filesystem paths for a floppy store.
Fields§
§data_dir: PathBufImplementations§
Source§impl FloppyPaths
impl FloppyPaths
Sourcepub fn builder(&self, session_id: impl Into<String>) -> FloppyBuilder
pub fn builder(&self, session_id: impl Into<String>) -> FloppyBuilder
Start a FloppyBuilder rooted at this data directory.
Source§impl FloppyPaths
impl FloppyPaths
pub fn new(data_dir: impl AsRef<Path>) -> Self
Sourcepub fn project_local() -> Self
pub fn project_local() -> Self
Project-local default: ./.floppy
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>) -> FloppyConfig
pub fn config(&self, session_id: impl Into<String>) -> FloppyConfig
Build a FloppyConfig 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§
Source§impl Clone for FloppyPaths
impl Clone for FloppyPaths
Source§fn clone(&self) -> FloppyPaths
fn clone(&self) -> FloppyPaths
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 FloppyPaths
impl Debug for FloppyPaths
impl Eq for FloppyPaths
Source§impl PartialEq for FloppyPaths
impl PartialEq for FloppyPaths
Source§fn eq(&self, other: &FloppyPaths) -> bool
fn eq(&self, other: &FloppyPaths) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FloppyPaths
Auto Trait Implementations§
impl Freeze for FloppyPaths
impl RefUnwindSafe for FloppyPaths
impl Send for FloppyPaths
impl Sync for FloppyPaths
impl Unpin for FloppyPaths
impl UnsafeUnpin for FloppyPaths
impl UnwindSafe for FloppyPaths
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