pub enum ContextDirection {
ActingIn,
Subtree,
Any,
}Expand description
Which way a context filter reads along the context hierarchy.
A context id names a subtree, so “entries relevant to context X” is two questions, not one, and an answer is only meaningful paired with the direction being asked:
| direction | question | predicate |
|---|---|---|
ActingIn | who may act in X? | scope is X or an ancestor of it |
Subtree | who holds a grant beneath X? | scope is X or a descendant of it |
Any | whose authority touches X’s subtree? | either of the above |
Only ActingIn existed until now, and a
caller sweeping a subtree to revoke it got back exactly the entries it was
not revoking (the ancestors keeping their authority) while every
leaf-scoped grant it existed to cut was silently absent — an incomplete
answer that looks like a complete one (#822).
ActingIn is the default, so an omitted
parameter is today’s behaviour exactly. An unparseable value is refused
rather than defaulted: guessing which question an operator meant is how the
silent-wrong-answer failure returns.
Variants§
ActingIn
Entries that may act in the context: scoped to it or to an ancestor
of it. The historical (and default) behaviour of ?context=.
Subtree
Entries holding a grant at or beneath the context. The revocation- sweep and delegation-audit direction.
Any
The union — every entry whose act authority touches the context’s subtree in either direction. The auditor’s question.
Implementations§
Trait Implementations§
Source§impl Clone for ContextDirection
impl Clone for ContextDirection
Source§fn clone(&self) -> ContextDirection
fn clone(&self) -> ContextDirection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more