pub struct LocalStorageConfig {
pub root_path: PathBuf,
pub create_directories: bool,
pub file_permissions: Option<u32>,
pub directory_permissions: Option<u32>,
}Expand description
Local storage configuration
Fields§
§root_path: PathBufRoot directory for file storage
create_directories: boolCreate directories if they don’t exist
file_permissions: Option<u32>File permissions (Unix only)
directory_permissions: Option<u32>Directory permissions (Unix only)
Implementations§
Source§impl LocalStorageConfig
impl LocalStorageConfig
Sourcepub fn with_root_path<P: Into<PathBuf>>(self, path: P) -> Self
pub fn with_root_path<P: Into<PathBuf>>(self, path: P) -> Self
Set root path
Sourcepub fn create_directories(self) -> Self
pub fn create_directories(self) -> Self
Enable automatic directory creation
Sourcepub fn no_create_directories(self) -> Self
pub fn no_create_directories(self) -> Self
Disable automatic directory creation
Sourcepub fn with_file_permissions(self, permissions: u32) -> Self
pub fn with_file_permissions(self, permissions: u32) -> Self
Set file permissions (Unix only)
Sourcepub fn with_directory_permissions(self, permissions: u32) -> Self
pub fn with_directory_permissions(self, permissions: u32) -> Self
Set directory permissions (Unix only)
Trait Implementations§
Source§impl Clone for LocalStorageConfig
impl Clone for LocalStorageConfig
Source§fn clone(&self) -> LocalStorageConfig
fn clone(&self) -> LocalStorageConfig
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 LocalStorageConfig
impl Debug for LocalStorageConfig
Source§impl Default for LocalStorageConfig
impl Default for LocalStorageConfig
Source§impl<'de> Deserialize<'de> for LocalStorageConfig
impl<'de> Deserialize<'de> for LocalStorageConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LocalStorageConfig
impl RefUnwindSafe for LocalStorageConfig
impl Send for LocalStorageConfig
impl Sync for LocalStorageConfig
impl Unpin for LocalStorageConfig
impl UnwindSafe for LocalStorageConfig
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