pub fn to_json(&self) -> Value {
    match self {
      &MatchingRule::Equality => json!({ "match": Value::String(s!("equality")) }),
      &MatchingRule::Regex(ref r) => json!({ "match": Value::String(s!("regex")),
        "regex": Value::String(r.clone()) }),
      &MatchingRule::Type => json!({ "match": Value::String(s!("type")) }),
      &MatchingRule::MinType(min) => json!({ "match": Value::String(s!("type")),
        "min": json!(min as u64) }),
      &MatchingRule::MaxType(max) => json!({ "match": Value::String(s!("type")),
        "max": json!(max as u64) }),
      &MatchingRule::MinMaxType(min, max) => json!({ "match": Value::String(s!("type")),
        "min": json!(min as u64), "max": json!(max as u64) }),
      &MatchingRule::Timestamp(ref t) => json!({ "match": Value::String(s!("timestamp")),
        "timestamp": Value::String(t.clone()) }),
      &MatchingRule::Time(ref t) => json!({ s!("match"): Value::String(s!("time")),
        s!("time"): Value::String(t.clone()) }),
      &MatchingRule::Date(ref d) => json!({ s!("match"): Value::String(s!("date")),
        s!("date"): Value::String(d.clone()) }),
      &MatchingRule::Include(ref s) => json!({ "match": Value::String(s!("include")),
        "value": Value::String(s.clone()) }),
      &MatchingRule::Number => json!({ "match": Value::String(s!("number")) }),
      &MatchingRule::Integer => json!({ "match": Value::String(s!("integer")) }),
      &MatchingRule::Decimal => json!({ "match": Value::String(s!("decimal")) }),
      &MatchingRule::Null => json!({ "match": Value::String(s!("null")) })
    }
  }
/// Converts this `MatchingRule` to a `Value` struct
Converts this `MatchingRule` to a `Value` struct
Converts this ` MatchingRule ` to a ` Value ` struct
pub fn to_json(&self) -> Value {
    match self {
      &MatchingRule::Equality => json!({ "match": Value::String(s!("equality")) }),
      &MatchingRule::Regex(ref r) => json!({ "match": Value::String(s!("regex")),
        "regex": Value::String(r.clone()) }),
      &MatchingRule::Type => json!({ "match": Value::String(s!("type")) }),
      &MatchingRule::MinType(min) => json!({ "match": Value::String(s!("type")),
        "min": json!(min as u64) }),
      &MatchingRule::MaxType(max) => json!({ "match": Value::String(s!("type")),
        "max": json!(max as u64) }),
      &MatchingRule::MinMaxType(min, max) => json!({ "match": Value::String(s!("type")),
        "min": json!(min as u64), "max": json!(max as u64) }),
      &MatchingRule::Timestamp(ref t) => json!({ "match": Value::String(s!("timestamp")),
        "timestamp": Value::String(t.clone()) }),
      &MatchingRule::Time(ref t) => json!({ s!("match"): Value::String(s!("time")),
        s!("time"): Value::String(t.clone()) }),
      &MatchingRule::Date(ref d) => json!({ s!("match"): Value::String(s!("date")),
        s!("date"): Value::String(d.clone()) }),
      &MatchingRule::Include(ref s) => json!({ "match": Value::String(s!("include")),
        "value": Value::String(s.clone()) }),
      &MatchingRule::Number => json!({ "match": Value::String(s!("number")) }),
      &MatchingRule::Integer => json!({ "match": Value::String(s!("integer")) }),
      &MatchingRule::Decimal => json!({ "match": Value::String(s!("decimal")) }),
      &MatchingRule::Null => json!({ "match": Value::String(s!("null")) })
    }
  }
pub fn to_json ( & self ) -> Value { match self { & MatchingRule :: Equality => json ! ( { " " Value String ( s ( " " ) ) } ) , & MatchingRule :: Regex ( ref r ) => json ! ( { " " Value String ( s ( " " ) ) " " Value String ( r clone ( ) ) } ) , & MatchingRule :: Type => json ! ( { " " Value String ( s ( " " ) ) } ) , & MatchingRule :: MinType ( min ) => json ! ( { " " Value String ( s ( " " ) ) " " json ( min as u64 ) } ) , & MatchingRule :: MaxType ( max ) => json ! ( { " " Value String ( s ( " " ) ) " " json ( max as u64 ) } ) , & MatchingRule :: MinMaxType ( min , max ) => json ! ( { " " Value String ( s ( " " ) ) " " json ( min as u64 ) " " json ( max as u64 ) } ) , & MatchingRule :: Timestamp ( ref t ) => json ! ( { " " Value String ( s ( " " ) ) " " Value String ( t clone ( ) ) } ) , & MatchingRule :: Time ( ref t ) => json ! ( { s ( " " ) Value String ( s ( " " ) ) s ( " " ) Value String ( t clone ( ) ) } ) , & MatchingRule :: Date ( ref d ) => json ! ( { s ( " " ) Value String ( s ( " " ) ) s ( " " ) Value String ( d clone ( ) ) } ) , & MatchingRule :: Include ( ref s ) => json ! ( { " " Value String ( s ( " " ) ) " " Value String ( s clone ( ) ) } ) , & MatchingRule :: Number => json ! ( { " " Value String ( s ( " " ) ) } ) , & MatchingRule :: Integer => json ! ( { " " Value String ( s ( " " ) ) } ) , & MatchingRule :: Decimal => json ! ( { " " Value String ( s ( " " ) ) } ) , & MatchingRule :: Null => json ! ( { " " Value String ( s ( " " ) ) } ) } }
Converts this `MatchingRule` to a `Value` struct
Converts this ` MatchingRule ` to a ` Value ` struct
&self
&self