asr::settings::gui

Trait Gui

Source
pub trait Gui {
    // Required methods
    fn register() -> Self;
    fn update_from(&mut self, settings_map: &Map);

    // Provided method
    fn update(&mut self) { ... }
}
Expand description

A trait that can be derived to describe an entire settings GUI through a struct declaration. Check the derive macro Gui for more information.

Required Methods§

Source

fn register() -> Self

Registers the settings by adding all the widgets to the settings GUI and initializing the settings with the values that the user has set or their default values if they haven’t been modified yet.

Source

fn update_from(&mut self, settings_map: &Map)

Updates the settings with the values that the user has set from the settings map provided.

Provided Methods§

Source

fn update(&mut self)

Updates the settings with the values that the user has set from the currently set global settings map.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§