Derive Macro miniconf::MiniconfAtomic[][src]

#[derive(MiniconfAtomic)]
Expand description

Derive the Miniconf trait for a custom type that must be updated atomically.

This derive function should be used if the setting must be updated entirely at once (e.g. individual portions of the struct may not be updated independently).

See Miniconf for more information.

Example

#[derive(MiniconfAtomic)]
struct FilterParameters {
    coefficient: f32,
    length: usize,
}

#[derive(Miniconf)]
struct Settings {
    // Accessed with path `filter`, but `filter/length` and `filter/coefficients` are
    inaccessible.
    filter: FilterParameters,

    // Accessed with path `external`
    external: bool,
}