cosmic::cosmic_config

Trait CosmicConfigEntry

Source
pub trait CosmicConfigEntry: Sized {
    const VERSION: u64;

    // Required methods
    fn write_entry(&self, config: &Config) -> Result<(), Error>;
    fn get_entry(config: &Config) -> Result<Self, (Vec<Error>, Self)>;
    fn update_keys<T>(
        &mut self,
        config: &Config,
        changed_keys: &[T],
    ) -> (Vec<Error>, Vec<&'static str>)
       where T: AsRef<str>;
}

Required Associated Constants§

Required Methods§

Source

fn write_entry(&self, config: &Config) -> Result<(), Error>

Source

fn get_entry(config: &Config) -> Result<Self, (Vec<Error>, Self)>

Source

fn update_keys<T>( &mut self, config: &Config, changed_keys: &[T], ) -> (Vec<Error>, Vec<&'static str>)
where T: AsRef<str>,

Returns the keys that were updated

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§