Skip to main content

Reloadable

Trait Reloadable 

Source
pub trait Reloadable: 'static {
    // Required methods
    fn prepare() -> Result<Commit, Error>;
    fn name() -> &'static str;
}
Expand description

A configuration type that a ReloadGroup can drive.

Implemented by #[dynamic_config]. Implementing it by hand is possible but rarely what you want — the contract is that prepare does all the fallible work, and nothing checks that for you.

Required Methods§

Source

fn prepare() -> Result<Commit, Error>

Loads and validates, returning the swap to perform.

§Errors

Whatever a load of this type would report.

Source

fn name() -> &'static str

The type’s name, for diagnostics.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§