#[non_exhaustive]pub enum Kind {
Shell,
FsRead,
FsWrite,
Net,
Fetch,
EnvRead,
EnvSet,
Mcp,
}Expand description
One kind of atomic action. Ordered as policy files list them.
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.
Shell
A command or a whole pipeline.
FsRead
A file read.
FsWrite
A file write, create, delete or move.
Net
A network host.
Fetch
A host a read-only fetch tool (WebFetch) requests a URL from: a
narrower kind of net, so net rules apply to it as well (ADR-017).
EnvRead
An environment variable read.
EnvSet
An environment variable set.
Mcp
An MCP tool name.
Implementations§
Source§impl Kind
impl Kind
Sourcepub fn rule_kinds(self) -> &'static [Self]
pub fn rule_kinds(self) -> &'static [Self]
The rule-list and defaults keys that apply to an atom of this kind,
most specific first: a fetch is also network access, so net lists
match it and defaults.net is its fallback when defaults.fetch is unset.
Trait Implementations§
impl Copy for Kind
impl Eq for Kind
Source§impl Ord for Kind
impl Ord for Kind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Kind
impl PartialOrd for Kind
impl StructuralPartialEq for Kind
Auto Trait Implementations§
impl Freeze for Kind
impl RefUnwindSafe for Kind
impl Send for Kind
impl Sync for Kind
impl Unpin for Kind
impl UnsafeUnpin for Kind
impl UnwindSafe for Kind
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.