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