pub trait Config:
Debug
+ Default
+ DeserializeOwned {
// Required methods
fn load_toml(toml_string: impl AsRef<str>) -> Result<Self, FrameworkError>;
fn load_toml_file(path: impl AsRef<AbsPath>) -> Result<Self, FrameworkError>;
}
Expand description
Trait for Abscissa configuration data structures.
Required Methods§
Sourcefn load_toml(toml_string: impl AsRef<str>) -> Result<Self, FrameworkError>
fn load_toml(toml_string: impl AsRef<str>) -> Result<Self, FrameworkError>
Load the configuration from the given TOML string.
Sourcefn load_toml_file(path: impl AsRef<AbsPath>) -> Result<Self, FrameworkError>
fn load_toml_file(path: impl AsRef<AbsPath>) -> Result<Self, FrameworkError>
Load the global configuration from the TOML file at the given path. If an error occurs reading or parsing the file, print it out and exit.
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.