fn cmp(&self, other: &Value) -> Ordering {
        use self::Value::*;
        match (self, other) {
            (Integer(a), Integer(b)) => a.abs().cmp(&b.abs()),
            (Integer(_), _) | (_, Integer(_)) => Ordering::Less,
            (Text(a), Text(b)) => a.cmp(b),
            (Text(_), _) | (_, Text(_)) => Ordering::Less,
            (Array(a), Array(b)) => a.cmp(b),
            (Array(_), _) | (_, Array(_)) => Ordering::Less,
            (Map(a), Map(b)) => a.cmp(b),
        }
    }
/// Each type compares with itself. Different types compare as
/// Integer < Text < Map < Array.
Each type compares with itself. Different types compare as
Integer < Text < Map < Array.
Each type compares with itself . Different types compare as Integer < Text < Map < Array .
fn cmp(&self, other: &Value) -> Ordering {
        use self::Value::*;
        match (self, other) {
            (Integer(a), Integer(b)) => a.abs().cmp(&b.abs()),
            (Integer(_), _) | (_, Integer(_)) => Ordering::Less,
            (Text(a), Text(b)) => a.cmp(b),
            (Text(_), _) | (_, Text(_)) => Ordering::Less,
            (Array(a), Array(b)) => a.cmp(b),
            (Array(_), _) | (_, Array(_)) => Ordering::Less,
            (Map(a), Map(b)) => a.cmp(b),
        }
    }
fn cmp ( & self , other : & Value ) -> Ordering { use self :: Value :: * ; match ( self , other ) { ( Integer ( a ) , Integer ( b ) ) => a . abs ( ) . cmp ( & b . abs ( ) ) , ( Integer ( _ ) , _ ) | ( _ , Integer ( _ ) ) => Ordering :: Less , ( Text ( a ) , Text ( b ) ) => a . cmp ( b ) , ( Text ( _ ) , _ ) | ( _ , Text ( _ ) ) => Ordering :: Less , ( Array ( a ) , Array ( b ) ) => a . cmp ( b ) , ( Array ( _ ) , _ ) | ( _ , Array ( _ ) ) => Ordering :: Less , ( Map ( a ) , Map ( b ) ) => a . cmp ( b ) , } }
Each type compares with itself.
Each type compares with itself .
&self
other
&Value
&self
other
&Value