pub fn try_get_parse<T: ::std::str::FromStr>(&self, key: &str) -> Option<T>
    where
        T::Err: ::std::fmt::Debug
    {
        match self.try_get(key) {
            Some(s) => {
                let c = s.parse::<T>()
                    .unwrap_or_else(|_| panic!("Error parsing key to type: {}", key));
                Some(c)
            },
            None => None,
        }
    }
/// Attempt to get a value based on key as type.
///
/// # Examples
///
/// ```rust
/// # use direkuta::prelude::*;
/// let mut capture = Capture::new();
///
/// capture.set("message", "0");
///
/// println!("{:?}", capture.try_get_parse::<u8>("message"));
/// ```
///
/// # Panics
///
/// If the key does not exist the function will panic.
Attempt to get a value based on key as type.
Attempt to get a value based on key as type .
pub fn try_get_parse<T: ::std::str::FromStr>(&self, key: &str) -> Option<T>
    where
        T::Err: ::std::fmt::Debug
    {
        match self.try_get(key) {
            Some(s) => {
                let c = s.parse::<T>()
                    .unwrap_or_else(|_| panic!("Error parsing key to type: {}", key));
                Some(c)
            },
            None => None,
        }
    }
pub fn try_get_parse < T : :: std :: str :: FromStr > ( & self , key : & str ) -> Option < T > where T :: Err : :: std :: fmt :: Debug { match self . try_get ( key ) { Some ( s ) => { let c = s . parse :: < T > ( ) . unwrap_or_else ( | _ | panic ! ( " " key ) ) ; Some ( c ) } , None => None , } }
Attempt to get a value based on key as type.
Attempt to get a value based on key as type .
&self
key
&str
&self
key
&str
examples
None
use direkuta::prelude::*;
let mut capture = Capture::new().




let mut capture = Capture :: new () .
panics
If the key does not exist the function will panic.
If the key does not exist the function will panic .