pub struct StateManager { /* private fields */ }
Implementations§
Source§impl StateManager
impl StateManager
pub fn new() -> Self
pub fn register_state<T: 'static + Clone + Send + Sync>( &self, id: &str, state: T, )
pub fn get_state<T: 'static + Send + Sync>(&self, id: &str) -> Option<State<T>>
pub fn register_callback<T: 'static + Send + Sync>( &self, id: &str, callback: StateChangeCallback<T>, )
pub fn notify_state_change<T: 'static + Send + Sync>( &self, id: &str, field: &str, state: &T, )
Auto Trait Implementations§
impl !Freeze for StateManager
impl RefUnwindSafe for StateManager
impl Send for StateManager
impl Sync for StateManager
impl Unpin for StateManager
impl UnwindSafe for StateManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more