ContextState

Trait ContextState 

Source
pub trait ContextState {
    // Required methods
    fn get<T>(&self) -> Option<&T>
       where T: Send + Sync + 'static;
    fn set<T>(&self, value: T) -> bool
       where T: Send + Sync + 'static;
}
Expand description

A trait for accessing state values

Required Methods§

Source

fn get<T>(&self) -> Option<&T>
where T: Send + Sync + 'static,

Get a reference to a state value

Source

fn set<T>(&self, value: T) -> bool
where T: Send + Sync + 'static,

Set a state value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§