pub trait TnuaSchemeConfig: Serialize + for<'de> Deserialize<'de> {
type Scheme: TnuaScheme<Config = Self>;
// Provided method
fn write_if_not_exist(&self, path: impl AsRef<Path>) -> Result<()> { ... }
}Expand description
A big configuration struct, containing the configuration of the basis and of all the actions of a control scheme.
Required Associated Types§
Sourcetype Scheme: TnuaScheme<Config = Self>
type Scheme: TnuaScheme<Config = Self>
The control scheme this configuration belongs to.
Provided Methods§
Sourcefn write_if_not_exist(&self, path: impl AsRef<Path>) -> Result<()>
fn write_if_not_exist(&self, path: impl AsRef<Path>) -> Result<()>
Use to create a template of the configuration in the assets directory.
The call to this function should be removed after the file is created, to avoid checking it on every run and to avoid breaking WASM (which cannot access the assets directory using the filesystem)
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.