[][src]Macro pact_consumer::term

macro_rules! term {
    ($regex:expr, $example:expr) => { ... };
}

A pattern which macthes the regular expression $regex (specified as a string) literal, and which generates $example.

json_pattern!({
  // Match a string consisting of numbers and lower case letters, and
  // generate `"10a"`.$crate::patterns::
  "id_string": term!("^[0-9a-z]$", "10a")
});