pub enum KeyScope {
AllInScope,
Keys(BTreeSet<String>),
}Expand description
An entry’s authority over signing-oracle key ids — the effective
decision decoded from the stored allowed_keys member (#818).
This is the actor-scoped complement of ContextPolicy.signable_keys
(which is resource-bound and constrains every actor uniformly): it narrows
which keys this caller may invoke the signing oracle on, and it only
ever intersects with the context scope — a key named in the filter
that lies outside the entry’s contexts stays unreachable.
Exists for the same reason ActScope does: Option<BTreeSet<String>>
has an empty-vs-absent distinction that a bare is_empty() gets
backwards (see docs/05-design-notes/acl-scope-semantics.md). Decode once
through key_scope_for / AclEntry::key_scope, then ask
KeyScope::allows — never test emptiness at a call site.
Variants§
AllInScope
No per-key filter: every key the entry’s context scope reaches.
This is the decode of an absent (None) allowed_keys — the
behaviour of every entry that pre-dates the member.
Keys(BTreeSet<String>)
Exactly these key ids (still intersected with the context scope).
The decode of a present allowed_keys, including the empty
set: Some([]) authorizes no keys — the narrowest grant, the
opposite of absent, and deliberately not a wildcard.
Implementations§
Trait Implementations§
impl Eq for KeyScope
impl StructuralPartialEq for KeyScope
Auto Trait Implementations§
impl Freeze for KeyScope
impl RefUnwindSafe for KeyScope
impl Send for KeyScope
impl Sync for KeyScope
impl Unpin for KeyScope
impl UnsafeUnpin for KeyScope
impl UnwindSafe for KeyScope
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,
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.