#[non_exhaustive]pub enum GrantScope {
ExactCall,
ToolOnServer {
server: String,
tool: String,
},
SiteActs {
origin: String,
tier: String,
},
AppTarget {
app: String,
},
Custom {
class: String,
target: String,
},
}Expand description
What one owner approval covers, as the tool that asked declares it: typed, so a later call is matched by what it targets, never by its arguments’ text.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ExactCall
The exact call the card showed (the kernel’s SessionGrants key
it by subject and effects); ScopedGrants keeps nothing for it.
ToolOnServer
Every call of one tool on one server (an MCP server’s tool), with any arguments.
SiteActs
Acting on one site (origin) at one tier of action (the tool’s own
name for it, such as act or submit).
AppTarget
Operating one application (by its stable identifier, such as a bundle id).
Custom
Anything else a tool can name: a class of action and its target, both in the tool’s own vocabulary.
Implementations§
Source§impl GrantScope
impl GrantScope
Sourcepub fn is_reusable(&self) -> bool
pub fn is_reusable(&self) -> bool
Whether an approval of this scope can cover a later, different call.
Trait Implementations§
Source§impl Clone for GrantScope
impl Clone for GrantScope
Source§fn clone(&self) -> GrantScope
fn clone(&self) -> GrantScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GrantScope
impl Debug for GrantScope
impl Eq for GrantScope
Source§impl Hash for GrantScope
impl Hash for GrantScope
Source§impl PartialEq for GrantScope
impl PartialEq for GrantScope
impl StructuralPartialEq for GrantScope
Auto Trait Implementations§
impl Forget for GrantScope
impl Freeze for GrantScope
impl Move for GrantScope
impl RefUnwindSafe for GrantScope
impl Send for GrantScopewhere
RawVecInner: Send,
impl Sync for GrantScopewhere
RawVecInner: Sync,
impl Unpin for GrantScope
impl UnsafeUnpin for GrantScope
impl UnwindSafe for GrantScopewhere
RawVecInner: UnwindSafe,
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more