Skip to main content

register_mode

Function register_mode 

Source
pub fn register_mode(id: impl Into<String>, apply: impl Fn() + 'static)
Expand description

Registers a named mode. apply installs the concrete theme when the mode is selected. Re-registering an id replaces its closure, which is expected: hot reload re-runs the app’s setup and re-registers every mode.