pub trait SysConf:
Debug
+ 'static
+ Serialize
+ Deserialize {
// Required methods
fn init(args: &SysConfArgs) -> Result<Self>
where Self: Sized;
fn apply(&self, is_enter: bool, args: &SysConfArgs) -> Result<()>;
// Provided method
fn init_boxed(args: &SysConfArgs) -> Result<Box<dyn SysConf>>
where Self: Sized { ... }
}Expand description
Extensible system configuration change unit.
Required Methods§
fn init(args: &SysConfArgs) -> Result<Self>where
Self: Sized,
fn apply(&self, is_enter: bool, args: &SysConfArgs) -> Result<()>
Provided Methods§
fn init_boxed(args: &SysConfArgs) -> Result<Box<dyn SysConf>>where
Self: Sized,
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".