Trait perseus::config_manager::ConfigManager[][src]

pub trait ConfigManager: Clone {
    fn read<'life0, 'life1, 'async_trait>(
        &'life0 self,
        name: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn write<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        name: &'life1 str,
        content: &'life2 str
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
; }
Expand description

A trait for systems that manage where to put configuration files. At simplest, we’ll just write them to static files, but they’re more likely to be stored on a CMS.

Required methods

Reads data from the named asset.

Writes data to the named asset. This will create a new asset if one doesn’t exist already.

Implementors