pub fn as_i32(&self) -> crate::Result<i32> {
        match &self {
            Self::I32(v) => Ok(*v),
            Self::U32(v) => Ok(*v as i32),
            Self::F64(v) => Ok(*v as i32),
            Self::Bool(v) => Ok(*v as i32),
            Self::Str(v) => match v.parse::<i32>() {
                Ok(i) => Ok(i),
                Err(e) => Err(error::parse_value(e.into())),
            },
            _ => Err(error::unimplement("can not convert to i32"))
        }
    }
/// If Value can parse to i32, returns an i32. Returns Err otherwise.
If Value can parse to i32, returns an i32. Returns Err otherwise.
If Value can parse to i32 returns an i32 . Returns Err otherwise .
pub fn as_i32(&self) -> crate::Result<i32> {
        match &self {
            Self::I32(v) => Ok(*v),
            Self::U32(v) => Ok(*v as i32),
            Self::F64(v) => Ok(*v as i32),
            Self::Bool(v) => Ok(*v as i32),
            Self::Str(v) => match v.parse::<i32>() {
                Ok(i) => Ok(i),
                Err(e) => Err(error::parse_value(e.into())),
            },
            _ => Err(error::unimplement("can not convert to i32"))
        }
    }
pub fn as_i32 ( & self ) -> crate :: Result < i32 > { match & self { Self :: I32 ( v ) => Ok ( * v ) , Self :: U32 ( v ) => Ok ( * v as i32 ) , Self :: F64 ( v ) => Ok ( * v as i32 ) , Self :: Bool ( v ) => Ok ( * v as i32 ) , Self :: Str ( v ) => match v . parse :: < i32 > ( ) { Ok ( i ) => Ok ( i ) , Err ( e ) => Err ( error :: parse_value ( e . into ( ) ) ) , } , _ => Err ( error :: unimplement ( " " ) ) } }
If Value can parse to i32, returns an i32.
If Value can parse to i32 returns an i32 .
&self