pub struct DirStorageStrategy {
pub format: FormatStrategy,
pub atomic_write: AtomicWriteConfig,
pub extension: Option<String>,
pub filename_encoding: FilenameEncoding,
}Expand description
Strategy configuration for directory-based storage operations.
Fields§
§format: FormatStrategyFile format to use (JSON or TOML)
atomic_write: AtomicWriteConfigAtomic write configuration
extension: Option<String>Custom file extension (if None, derived from format)
filename_encoding: FilenameEncodingFile naming encoding strategy
Implementations§
Source§impl DirStorageStrategy
impl DirStorageStrategy
Sourcepub fn with_format(self, format: FormatStrategy) -> Self
pub fn with_format(self, format: FormatStrategy) -> Self
Set the file format.
Sourcepub fn with_extension(self, ext: impl Into<String>) -> Self
pub fn with_extension(self, ext: impl Into<String>) -> Self
Set a custom file extension.
Sourcepub fn with_filename_encoding(self, encoding: FilenameEncoding) -> Self
pub fn with_filename_encoding(self, encoding: FilenameEncoding) -> Self
Set the filename encoding strategy.
Sourcepub fn with_retry_count(self, count: usize) -> Self
pub fn with_retry_count(self, count: usize) -> Self
Set the retry count for atomic writes.
Sourcepub fn with_cleanup(self, cleanup: bool) -> Self
pub fn with_cleanup(self, cleanup: bool) -> Self
Set whether to cleanup temporary files.
Trait Implementations§
Source§impl Clone for DirStorageStrategy
impl Clone for DirStorageStrategy
Source§fn clone(&self) -> DirStorageStrategy
fn clone(&self) -> DirStorageStrategy
Returns a duplicate of the value. Read more
1.0.0 · 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 DirStorageStrategy
impl Debug for DirStorageStrategy
Auto Trait Implementations§
impl Freeze for DirStorageStrategy
impl RefUnwindSafe for DirStorageStrategy
impl Send for DirStorageStrategy
impl Sync for DirStorageStrategy
impl Unpin for DirStorageStrategy
impl UnwindSafe for DirStorageStrategy
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