MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / matcher_def_to_proto

Function matcher_def_to_proto

crates/openshell-policy/src/lib.rs:370–378  ·  view source on GitHub ↗
(matcher: QueryMatcherDef)

Source from the content-addressed store, hash-verified

368// ---------------------------------------------------------------------------
369
370fn matcher_def_to_proto(matcher: QueryMatcherDef) -> L7QueryMatcher {
371 match matcher {
372 QueryMatcherDef::Glob(glob) => L7QueryMatcher { glob, any: vec![] },
373 QueryMatcherDef::Any(any) => L7QueryMatcher {
374 glob: String::new(),
375 any: any.any,
376 },
377 }
378}
379
380fn matcher_proto_to_def(matcher: L7QueryMatcher) -> QueryMatcherDef {
381 if matcher.any.is_empty() {

Callers 2

allow_def_to_protoFunction · 0.85
deny_def_to_protoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected