pub enum StoreConfig {
Memory,
File {
dir: PathBuf,
options: FileStoreOptions,
},
CachedFile {
dir: PathBuf,
options: FileStoreOptions,
},
Noop,
Custom(Arc<dyn MessageStore>),
}Expand description
Which store backend to construct.
Variants§
Memory
Volatile in-memory store.
File
File-backed store in a directory.
Fields
§
options: FileStoreOptionsFileStoreSync (FR-025).
CachedFile
File-backed store that also caches messages in memory.
Fields
§
options: FileStoreOptionsFileStoreSync/FileStoreMaxCachedMsgs (FR-025).
Noop
No-op store (never persists; sequence numbers stay at 1).
Custom(Arc<dyn MessageStore>)
NEW-158 (feature 012): a caller-supplied MessageStore implementation, for backends not
on the built-in list (or a proprietary audit-log sink) – previously only reachable via
the lower-level truefix::transport::Services::store escape hatch; this widens the
.cfg-adjacent config surface itself to express the same thing (FR-006). Arc (not
Box) so StoreConfig keeps deriving Clone.
Trait Implementations§
Source§impl Clone for StoreConfig
impl Clone for StoreConfig
Source§fn clone(&self) -> StoreConfig
fn clone(&self) -> StoreConfig
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 !RefUnwindSafe for StoreConfig
impl !UnwindSafe for StoreConfig
impl Freeze for StoreConfig
impl Send for StoreConfig
impl Sync for StoreConfig
impl Unpin for StoreConfig
impl UnsafeUnpin for StoreConfig
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