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