pub fn to_i64(&self) -> i64 {
        match self {
            Self::True => 1,
            Self::Integer(i) => *i,
            Self::Float(f) => *f as i64,
            Self::Str(s) => {
                // todo: JavaScript-style parseInt-like behavior?
                match s.parse::<i64>() {
                    Ok(i) => i,
                    Err(_) => 0,
                }
            }
            _ => 0,
        }
    }
/// Get value's integer representation.
Get value's integer representation.
Get value ' s integer representation .
pub fn to_i64(&self) -> i64 {
        match self {
            Self::True => 1,
            Self::Integer(i) => *i,
            Self::Float(f) => *f as i64,
            Self::Str(s) => {
                // todo: JavaScript-style parseInt-like behavior?
                match s.parse::<i64>() {
                    Ok(i) => i,
                    Err(_) => 0,
                }
            }
            _ => 0,
        }
    }
pub fn to_i64 ( & self ) -> i64 { match self { Self :: True => 1 , Self :: Integer ( i ) => * i , Self :: Float ( f ) => * f as i64 , Self :: Str ( s ) => { // todo: JavaScript-style parseInt-like behavior? match s . parse :: < i64 > ( ) { Ok ( i ) => i , Err ( _ ) => 0 , } } _ => 0 , } }
Get value's integer representation.
Get value ' s integer representation .
&self
&self