pub fn as_count(&self) -> usize {
        match *self {
            Switch(b) => if b { 1 } else { 0 },
            Counted(n) => n,
            Plain(None) => 0,
            Plain(Some(_)) => 1,
            List(ref vs) => vs.len(),
        }
    }
/// Returns the value as a count of the number of times it occurred.
///
/// Booleans are `1` if `true` and `0` otherwise.
/// Plain strings are `1` if present and `0` otherwise.
/// Lists correspond to its length.
Returns the value as a count of the number of times it occurred.
Returns the value as a count of the number of times it occurred .
pub fn as_count(&self) -> usize {
        match *self {
            Switch(b) => if b { 1 } else { 0 },
            Counted(n) => n,
            Plain(None) => 0,
            Plain(Some(_)) => 1,
            List(ref vs) => vs.len(),
        }
    }
pub fn as_count ( & self ) -> usize { match * self { Switch ( b ) => if b { 1 } else { 0 } , Counted ( n ) => n , Plain ( None ) => 0 , Plain ( Some ( _ ) ) => 1 , List ( ref vs ) => vs . len ( ) , } }
Returns the value as a count of the number of times it occurred.
Returns the value as a count of the number of times it occurred .
&self
&self