pub struct FilesystemConfig {
pub read_only_root: bool,
pub writable_paths: Vec<String>,
pub max_file_size: Option<String>,
pub max_disk_usage: Option<String>,
}Expand description
Filesystem configuration.
Fields§
§read_only_root: boolRead-only root filesystem.
writable_paths: Vec<String>Paths that are writable (within read-only root).
max_file_size: Option<String>Maximum file size that can be created.
max_disk_usage: Option<String>Maximum total disk usage.
Implementations§
Source§impl FilesystemConfig
impl FilesystemConfig
Sourcepub fn with_writable_path(self, path: impl Into<String>) -> Self
pub fn with_writable_path(self, path: impl Into<String>) -> Self
Add a writable path.
Sourcepub fn with_max_file_size(self, size: impl Into<String>) -> Self
pub fn with_max_file_size(self, size: impl Into<String>) -> Self
Set maximum file size.
Sourcepub fn with_max_disk_usage(self, size: impl Into<String>) -> Self
pub fn with_max_disk_usage(self, size: impl Into<String>) -> Self
Set maximum disk usage.
Sourcepub fn max_file_size_bytes(&self) -> Option<u64>
pub fn max_file_size_bytes(&self) -> Option<u64>
Parse max file size as bytes.
Sourcepub fn max_disk_usage_bytes(&self) -> Option<u64>
pub fn max_disk_usage_bytes(&self) -> Option<u64>
Parse max disk usage as bytes.
Trait Implementations§
Source§impl Clone for FilesystemConfig
impl Clone for FilesystemConfig
Source§fn clone(&self) -> FilesystemConfig
fn clone(&self) -> FilesystemConfig
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 FilesystemConfig
impl Debug for FilesystemConfig
Source§impl Default for FilesystemConfig
impl Default for FilesystemConfig
Source§fn default() -> FilesystemConfig
fn default() -> FilesystemConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FilesystemConfig
impl<'de> Deserialize<'de> for FilesystemConfig
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 FilesystemConfig
impl RefUnwindSafe for FilesystemConfig
impl Send for FilesystemConfig
impl Sync for FilesystemConfig
impl Unpin for FilesystemConfig
impl UnwindSafe for FilesystemConfig
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