usestd::sync::{Arc, Mutex};/// Contains the current ui state of the application.
////// To create a shareable reference to an instance of this struct, use
/// `new_shared()`, which will create an arcmutex around a new struct instance.
pubstructUIState{pub(crate)_current_tab:usize,
}implUIState{/// Instantiate a new instance of this struct with default values.
pub(crate)fnnew()->Self{
UIState { _current_tab:0}}/// Instantiate a new instance of this struct, and wrap it in an
/// arcmutex.
pub(crate)fnnew_shared()->Arc<Mutex<UIState>>{Arc::new(Mutex::new(Self::new()))}}