pub struct Predicate {
pub arg: Option<ArgNames>,
pub under: Vec<String>,
pub not_under: Vec<String>,
pub host_in: Vec<String>,
pub host_not_in: Vec<String>,
pub is_in: Vec<String>,
pub not_in: Vec<String>,
pub matches: Vec<String>,
pub not_matches: Vec<String>,
pub provenance: Option<Provenance>,
}Expand description
One condition: arg (optional) and exactly one test.
A positive test (under, host_in, in, matches, provenance) holds
when some value passes it. A negated one (not_under, host_not_in,
not_in, not_matches) holds unless the call has values and every
one passes the positive test: a call that names no such value, or more
values than are read, is not shown to stay inside, so the condition holds
(fail closed).
Fields§
§arg: Option<ArgNames>Which arguments the test reads, by name (snake case, or a dotted path
message.to); absent, the test’s own default (§2.4).
under: Vec<String>Holds when a path is one of these or below one (globs, ~, ${project}).
not_under: Vec<String>Holds when a path is outside all of these, or the call names none.
host_in: Vec<String>Holds when a URL’s host matches one of these host globs.
host_not_in: Vec<String>Holds when a URL’s host matches none of these, or the call names none.
is_in: Vec<String>Holds when a value (each address of a recipient list) matches one of these globs, ignoring case.
not_in: Vec<String>Holds when a value (each address of a recipient list) matches none of these, or the call has none.
matches: Vec<String>Holds when a whole value matches one of these globs.
not_matches: Vec<String>Holds when a value matches none of these globs, or the call has none.
provenance: Option<Provenance>untrusted: holds when a host or path in a value came from untrusted
output the session read.