AppState

Trait AppState 

Source
pub trait AppState:
    Any
    + Send
    + Sync
    + 'static {
    // Required methods
    fn as_any(&self) -> &dyn Any;
    fn as_any_mut(&mut self) -> &mut dyn Any;
}
Expand description

Represents the state of an application in Ngyn

Required Methods§

Source

fn as_any(&self) -> &dyn Any

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Trait Implementations§

Source§

impl From<&Arc<Box<dyn AppState>>> for Box<dyn AppState>

§Panics

Panics if the state has been dropped. This should never happen unless the state is dropped manually.

Source§

fn from(value: &Arc<Box<dyn AppState>>) -> Self

Converts to this type from the input type.

Implementations on Foreign Types§

Source§

impl<T: AppState> AppState for Box<T>

Source§

fn as_any(&self) -> &dyn Any

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Implementors§