Skip to main content

rumtk_web_get_config

Macro rumtk_web_get_config 

Source
macro_rules! rumtk_web_get_config {
    ( $state:expr ) => { ... };
}
Expand description

Get field state from the configuration section of the SharedAppState object. The configuration is of type AppConf.

ยงExample

use rumtk_core::rumtk_new_lock;
use rumtk_core::strings::RUMString;
use rumtk_web::{AppState, ClipboardID, SharedAppState, AppConf};
use rumtk_web::{rumtk_web_set_config, rumtk_web_get_config};

let state = rumtk_new_lock!(AppState::new());

let new_lang = rumtk_web_get_config!(state).lang.clone();

assert_eq!(new_lang, "", "Language field in the configuration was not empty!");