pub struct PersistentConfig { /* private fields */ }Expand description
Top-level persistent configuration required for the engine
Implementations§
Source§impl PersistentConfig
impl PersistentConfig
Sourcepub fn open(auto_create_config_file: bool) -> Result<PersistentConfig>
pub fn open(auto_create_config_file: bool) -> Result<PersistentConfig>
Open the per-user configuration file.
This file is stored in TOML format. If the configuration file does not
exist, no error is signaled — instead, a basic default configuration
is returned. In this case, if auto_create_config_file is true, the
configuration file (and the directory containing it) will be
automatically created, filling in the default configuration. If it is
false, the default configuration is returned and the filesystem is not
modified.
Sourcepub fn default_bundle_loc(&self) -> &str
pub fn default_bundle_loc(&self) -> &str
Get the default bundle URL for this configuration
Sourcepub fn default_bundle(&self, only_cached: bool) -> Result<Box<dyn Bundle>>
pub fn default_bundle(&self, only_cached: bool) -> Result<Box<dyn Bundle>>
Attempt to open the default bundle
Sourcepub fn format_cache_path(&self) -> Result<PathBuf>
pub fn format_cache_path(&self) -> Result<PathBuf>
Get the cache directory to use for format files
Trait Implementations§
Source§impl Default for PersistentConfig
impl Default for PersistentConfig
Source§impl<'de> Deserialize<'de> for PersistentConfig
impl<'de> Deserialize<'de> for PersistentConfig
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 PersistentConfig
impl RefUnwindSafe for PersistentConfig
impl Send for PersistentConfig
impl Sync for PersistentConfig
impl Unpin for PersistentConfig
impl UnsafeUnpin for PersistentConfig
impl UnwindSafe for PersistentConfig
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