Skip to main content

ConfigReloader

Trait ConfigReloader 

Source
pub trait ConfigReloader: Send + Sync {
    // Required methods
    fn source_label(&self) -> String;
    fn maybe_reload(&self) -> ConfigReloaderFuture<'_, Option<ConfigState>>;
    fn reload_now(&self) -> ConfigReloaderFuture<'_, ConfigState>;
}

Required Methods§

Source

fn source_label(&self) -> String

Human-readable description of where config is loaded from, for logs.

Source

fn maybe_reload(&self) -> ConfigReloaderFuture<'_, Option<ConfigState>>

Return a freshly loaded state if a reload is needed; otherwise, return None.

Source

fn reload_now(&self) -> ConfigReloaderFuture<'_, ConfigState>

Force a reload, regardless of whether a change was detected.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§