Skip to main content

AppDataExt

Trait AppDataExt 

Source
pub trait AppDataExt {
    // Required method
    fn get_or_default<T: Default + Send + Sync + 'static>(&self) -> &T;
}
Expand description

Set of utilities to work with state crate

Required Methods§

Source

fn get_or_default<T: Default + Send + Sync + 'static>(&self) -> &T

Attempts to retrieve the global state for type T. If it hasn’t been initialize, a new one T will be created using Default::default

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§