pub fn to_bigint(&self) -> Option<BigInt> {
        match self {
            Value::Int(n) => Some(BigInt::from_i32(*n).unwrap()),
            Value::BigInt(n) => Some(n.clone()),
            Value::Float(f) => Some(BigInt::from_i32(*f as i32).unwrap()),
            Value::String(s, _) => {
                let n_r = s.to_string().parse::<num_bigint::BigInt>();
                match n_r {
                    Ok(n) => {
                        return Some(n);
                    }
                    _ => {
                        return None;
                    }
                }
            }
            Value::Null => Some(BigInt::from_i32(0).unwrap()),
            _ => None,
        }
    }
/// Convert the current value into a bigint.  If the value is not
/// representable as a bigint, the result will be None.
Convert the current value into a bigint.  If the value is not
representable as a bigint, the result will be None.
Convert the current value into a bigint . If the value is not representable as a bigint the result will be None .
pub fn to_bigint(&self) -> Option<BigInt> {
        match self {
            Value::Int(n) => Some(BigInt::from_i32(*n).unwrap()),
            Value::BigInt(n) => Some(n.clone()),
            Value::Float(f) => Some(BigInt::from_i32(*f as i32).unwrap()),
            Value::String(s, _) => {
                let n_r = s.to_string().parse::<num_bigint::BigInt>();
                match n_r {
                    Ok(n) => {
                        return Some(n);
                    }
                    _ => {
                        return None;
                    }
                }
            }
            Value::Null => Some(BigInt::from_i32(0).unwrap()),
            _ => None,
        }
    }
pub fn to_bigint ( & self ) -> Option < BigInt > { match self { Value :: Int ( n ) => Some ( BigInt :: from_i32 ( * n ) . unwrap ( ) ) , Value :: BigInt ( n ) => Some ( n . clone ( ) ) , Value :: Float ( f ) => Some ( BigInt :: from_i32 ( * f as i32 ) . unwrap ( ) ) , Value :: String ( s , _ ) => { let n_r = s . to_string ( ) . parse :: < num_bigint :: BigInt > ( ) ; match n_r { Ok ( n ) => { return Some ( n ) ; } _ => { return None ; } } } Value :: Null => Some ( BigInt :: from_i32 ( 0 ) . unwrap ( ) ) , _ => None , } }
Convert the current value into a bigint.
Convert the current value into a bigint .
&self