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§
Sourcefn register() -> Self
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.
Sourcefn update_from(&mut self, settings_map: &Map)
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§
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.