Skip to main content

SysConf

Trait SysConf 

Source
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§

Source

fn init(args: &SysConfArgs) -> Result<Self>
where Self: Sized,

Source

fn apply(&self, is_enter: bool, args: &SysConfArgs) -> Result<()>

Provided Methods§

Source

fn init_boxed(args: &SysConfArgs) -> Result<Box<dyn SysConf>>
where Self: Sized,

Trait Implementations§

Source§

impl<'typetag> Serialize for dyn SysConf + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn SysConf + Send + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn SysConf + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl<'typetag> Serialize for dyn SysConf + Send + Sync + 'typetag

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§