pub enum ContextDirection {
ActingIn,
Subtree,
Any,
}Expand description
A DID’s authority to confer access through an approval, re-exported from the SDK.
The type lives in vta-sdk because the DIDComm and Trust Task update
bodies carry it and must be constructible by clients that never link the
server crates. Only the shape is shared — every authorization rule over
it (validate_approve_scope_grant below) stays here. Same arrangement as
crate::context_path.
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 moreimpl Copy for ContextDirection
Source§impl Debug for ContextDirection
impl Debug for ContextDirection
Source§impl Default for ContextDirection
impl Default for ContextDirection
Source§fn default() -> ContextDirection
fn default() -> ContextDirection
Source§impl<'de> Deserialize<'de> for ContextDirection
impl<'de> Deserialize<'de> for ContextDirection
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContextDirection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ContextDirection, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for ContextDirection
impl Display for ContextDirection
impl Eq for ContextDirection
Source§impl FromStr for ContextDirection
impl FromStr for ContextDirection
Source§impl PartialEq for ContextDirection
impl PartialEq for ContextDirection
Source§impl Serialize for ContextDirection
impl Serialize for ContextDirection
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ContextDirection
Auto Trait Implementations§
impl Freeze for ContextDirection
impl RefUnwindSafe for ContextDirection
impl Send for ContextDirection
impl Sync for ContextDirection
impl Unpin for ContextDirection
impl UnsafeUnpin for ContextDirection
impl UnwindSafe for ContextDirection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.