Skip to main content

SyncConfigBackend

Trait SyncConfigBackend 

Source
pub trait SyncConfigBackend: 'static {
    // Required methods
    fn read(file: WatchFile) -> Result<RawConfigMap>;
    fn write(file: &mut WriteFile, config: &RawConfigMap) -> Result<()>;
}
Expand description

Represents a serializing/encoding backend for SyncConfig.

Required Methods§

Source

fn read(file: WatchFile) -> Result<RawConfigMap>

Read/deserialize raw config from the file.

This method runs in unblocked context.

Source

fn write(file: &mut WriteFile, config: &RawConfigMap) -> Result<()>

Write/serialize raw config to the file.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§