pub fn as_bool(&self) -> crate::Result<bool> {
        match &self {
            Self::I32(i) => Ok(*i > 0),
            Self::U32(u) => Ok(*u > 0),
            Self::I64(u) => Ok(*u > 0),
            Self::U64(u) => Ok(*u > 0),
            Self::F64(f) => Ok(*f > 0.0),
            Self::Bool(b) => Ok(*b),
            Self::Str(s) => match s.parse::<bool>() {
                Ok(b) => Ok(b),
                Err(e) => Err(error::parse_value(e.into())),
            },
            _ => Err(error::unimplement("Date or Time can not convert to bool"))
        }
    }
/// If Value can parse to bool, returns an bool. Returns Err otherwise.
If Value can parse to bool, returns an bool. Returns Err otherwise.
If Value can parse to bool returns an bool . Returns Err otherwise .
pub fn as_bool(&self) -> crate::Result<bool> {
        match &self {
            Self::I32(i) => Ok(*i > 0),
            Self::U32(u) => Ok(*u > 0),
            Self::I64(u) => Ok(*u > 0),
            Self::U64(u) => Ok(*u > 0),
            Self::F64(f) => Ok(*f > 0.0),
            Self::Bool(b) => Ok(*b),
            Self::Str(s) => match s.parse::<bool>() {
                Ok(b) => Ok(b),
                Err(e) => Err(error::parse_value(e.into())),
            },
            _ => Err(error::unimplement("Date or Time can not convert to bool"))
        }
    }
pub fn as_bool ( & self ) -> crate :: Result < bool > { match & self { Self :: I32 ( i ) => Ok ( * i > 0 ) , Self :: U32 ( u ) => Ok ( * u > 0 ) , Self :: I64 ( u ) => Ok ( * u > 0 ) , Self :: U64 ( u ) => Ok ( * u > 0 ) , Self :: F64 ( f ) => Ok ( * f > 0.0 ) , Self :: Bool ( b ) => Ok ( * b ) , Self :: Str ( s ) => match s . parse :: < bool > ( ) { Ok ( b ) => Ok ( b ) , Err ( e ) => Err ( error :: parse_value ( e . into ( ) ) ) , } , _ => Err ( error :: unimplement ( " " ) ) } }
If Value can parse to bool, returns an bool.
If Value can parse to bool returns an bool .
&self