fn make_regex_match_predicate(
    tag_key_name: impl Into<String>,
    pattern: impl Into<String>,
) -> Predicate {
    Predicate {
        root: Some(Node {
            node_type: NodeType::ComparisonExpression as i32,
            children: vec![
                Node {
                    node_type: NodeType::TagRef as i32,
                    children: vec![],
                    value: Some(Value::TagRefValue(tag_key_name.into().into())),
                },
                Node {
                    node_type: NodeType::Literal as i32,
                    children: vec![],
                    value: Some(Value::RegexValue(pattern.into())),
                },
            ],
            value: Some(Value::Comparison(Comparison::Regex as _)),
        }),
    }
}
// Create a predicate representing tag_name ~= /pattern/
//
// The constitution of this request was formed by looking at a real request
// made to storage, which looked like this:
//
// root:<
//         node_type:COMPARISON_EXPRESSION
//         children:<node_type:TAG_REF tag_ref_value:"tag_key_name" >
//         children:<node_type:LITERAL regex_value:"pattern" >
//         comparison:REGEX
// >
Create a predicate representing tag_name ~= /pattern
The constitution of this request was formed by looking at a real request
made to storage, which looked like this.


Create a predicate representing tag_name ~ = / pattern The constitution of this request was formed by looking at a real request made to storage which looked like this .
fn make_regex_match_predicate(
    tag_key_name: impl Into<String>,
    pattern: impl Into<String>,
) -> Predicate {
    Predicate {
        root: Some(Node {
            node_type: NodeType::ComparisonExpression as i32,
            children: vec![
                Node {
                    node_type: NodeType::TagRef as i32,
                    children: vec![],
                    value: Some(Value::TagRefValue(tag_key_name.into().into())),
                },
                Node {
                    node_type: NodeType::Literal as i32,
                    children: vec![],
                    value: Some(Value::RegexValue(pattern.into())),
                },
            ],
            value: Some(Value::Comparison(Comparison::Regex as _)),
        }),
    }
}
fn make_regex_match_predicate ( tag_key_name : impl Into < String > , pattern : impl Into < String > , ) -> Predicate { Predicate { root : Some ( Node { node_type : NodeType :: ComparisonExpression as i32 , children : vec ! [ Node { node_type NodeType TagRef as i32 children vec [ ] value Some ( Value TagRefValue ( tag_key_name into ( ) into ( ) ) ) } Node { node_type NodeType Literal as i32 children vec [ ] value Some ( Value RegexValue ( pattern into ( ) ) ) } ] , value : Some ( Value :: Comparison ( Comparison :: Regex as _ ) ) , } ) , } }
Create a predicate representing tag_name ~= /pattern
The constitution of this request was formed by looking at a real request
made to storage, which looked like this:
Create a predicate representing tag_name ~ = / pattern The constitution of this request was formed by looking at a real request made to storage which looked like this :
tag_key_name
impl Into<String>
pattern
impl Into<String>
tag_key_name
impl Into<String>
pattern
impl Into<String>