pub struct ConfigV2 {
pub version: u32,
pub id: String,
pub backend: Option<BackendConfigV2>,
pub cache: Option<CacheConfigV2>,
pub rafs: Option<RafsConfigV2>,
pub internal: ConfigV2Internal,
}Expand description
Configuration file format version 2, based on Toml.
Fields§
§version: u32Configuration file format version number, must be 2.
id: StringIdentifier for the instance.
backend: Option<BackendConfigV2>Configuration information for storage backend.
cache: Option<CacheConfigV2>Configuration information for local cache system.
rafs: Option<RafsConfigV2>Configuration information for RAFS filesystem.
internal: ConfigV2InternalInternal runtime configuration.
Implementations§
source§impl ConfigV2
impl ConfigV2
sourcepub fn new_localfs(id: &str, dir: &str) -> Result<Self>
pub fn new_localfs(id: &str, dir: &str) -> Result<Self>
Create a new configuration object for backend-localfs and filecache.
sourcepub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
Read configuration information from a file.
sourcepub fn get_backend_config(&self) -> Result<&BackendConfigV2>
pub fn get_backend_config(&self) -> Result<&BackendConfigV2>
Get configuration information for storage backend.
sourcepub fn get_cache_config(&self) -> Result<&CacheConfigV2>
pub fn get_cache_config(&self) -> Result<&CacheConfigV2>
Get configuration information for cache subsystem.
sourcepub fn get_cache_working_directory(&self) -> Result<String>
pub fn get_cache_working_directory(&self) -> Result<String>
Get cache working directory.
sourcepub fn get_rafs_config(&self) -> Result<&RafsConfigV2>
pub fn get_rafs_config(&self) -> Result<&RafsConfigV2>
Get configuration information for RAFS filesystem.
sourcepub fn clone_without_secrets(&self) -> Self
pub fn clone_without_secrets(&self) -> Self
Clone the object with all secrets removed.
sourcepub fn is_chunk_validation_enabled(&self) -> bool
pub fn is_chunk_validation_enabled(&self) -> bool
Check whether chunk digest validation is enabled or not.
sourcepub fn is_fs_cache(&self) -> bool
pub fn is_fs_cache(&self) -> bool
Check whether fscache is enabled or not.
Trait Implementations§
source§impl<'de> Deserialize<'de> for ConfigV2
impl<'de> Deserialize<'de> for ConfigV2
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
source§impl From<&BlobCacheEntryConfigV2> for ConfigV2
impl From<&BlobCacheEntryConfigV2> for ConfigV2
source§fn from(c: &BlobCacheEntryConfigV2) -> Self
fn from(c: &BlobCacheEntryConfigV2) -> Self
Converts to this type from the input type.
source§impl PartialEq<ConfigV2> for ConfigV2
impl PartialEq<ConfigV2> for ConfigV2
impl Eq for ConfigV2
impl StructuralEq for ConfigV2
impl StructuralPartialEq for ConfigV2
Auto Trait Implementations§
impl RefUnwindSafe for ConfigV2
impl Send for ConfigV2
impl Sync for ConfigV2
impl Unpin for ConfigV2
impl UnwindSafe for ConfigV2
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