ConfigFile

Trait ConfigFile 

Source
pub trait ConfigFile:
    Default
    + DeserializeOwned
    + Serialize
    + JsonSchema {
    // Required method
    fn config_file_path() -> PathBuf;

    // Provided methods
    fn delete(&self) -> Result<()> { ... }
    fn write(&self) -> Result<()> { ... }
}
Expand description

Trait defining a struct as representing a config file.

Required Methods§

Source

fn config_file_path() -> PathBuf

The path to the config file.

Provided Methods§

Source

fn delete(&self) -> Result<()>

Delete the config file.

Source

fn write(&self) -> Result<()>

Write the config file.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§