Function state_store::get_state
source · pub fn get_state<S: Any>() -> SSCached<S>
Expand description
Returns a Weak reference to the SystemState of the requested type S
,
which the caller can downcast into the specific type S
by invoking downcast_ref() on the data inside the Weak<> wrapper.
It’s safe for the caller to save/cache the returned value.