pub fn try_get<T: Any + Send + Sync + 'static>(&self) -> Option<&T> {
        self.inner
            .get(&TypeId::of::<T>())
            .and_then(|b| b.downcast_ref::<T>())
    }
/// Attempt to get a value based on type.
///
/// Use this if you are not sure if the type exists.
///
/// # Examples
///
/// ```rust
/// # use direkuta::prelude::*;
/// let mut state = State::new();
///
/// state.set(String::from("Hello World!"));
///
/// match state.try_get::<String>() {
///     Some(s) => {
///         println!("{}", s);
///     },
///     None => {
///         println!("String not found in state");
///     },
/// }
/// ```
Attempt to get a value based on type.
Use this if you are not sure if the type exists.
Attempt to get a value based on type . Use this if you are not sure if the type exists .
pub fn try_get<T: Any + Send + Sync + 'static>(&self) -> Option<&T> {
        self.inner
            .get(&TypeId::of::<T>())
            .and_then(|b| b.downcast_ref::<T>())
    }
pub fn try_get < T : Any + Send + Sync + ' static > ( & self ) -> Option < & T > { self . inner . get ( & TypeId :: of :: < T > ( ) ) . and_then ( | b | b . downcast_ref :: < T > ( ) ) }
Attempt to get a value based on type.
Attempt to get a value based on type .
&self
&self
examples
None
use direkuta::prelude::*;
let mut state = State::new().

state.set(String::from("Hello World!")).


let mut state = State :: new () . state . set ( String :: from ( " Hello World! " )) .