pub enum Effect {
Pure,
ReadLocal,
WriteLocal,
Network,
Process,
Destructive,
Exec,
Privileged,
}Expand description
The effect class of an operation — the single property safety reasons about. Ordered from harmless to most dangerous.
Variants§
Pure
No observable effect (pure computation).
ReadLocal
Reads local state (filesystem reads, env, process listing).
WriteLocal
Creates/modifies local state non-destructively (write, mkdir).
Network
Performs network I/O.
Process
Affects other processes (kill, signal).
Destructive
Irreversibly removes/overwrites local state (rm, truncate, drop).
Exec
Executes an arbitrary external command (shell passthrough).
Privileged
Requires elevated privileges / affects system-wide state.
Implementations§
Source§impl Effect
impl Effect
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
The effect’s canonical snake_case name (inverse of Self::from_name).
Sourcepub fn from_name(name: &str) -> Option<Effect>
pub fn from_name(name: &str) -> Option<Effect>
Parse an effect from its snake_case name (the inverse of Self::name).
Accepts the same spellings other effect taxonomies use (e.g. AetherShell’s
safety::Effect::as_str), so a host system’s effect classifier can be mapped
straight in. Returns None for an unknown name.
Sourcepub fn is_dangerous(self) -> bool
pub fn is_dangerous(self) -> bool
Whether this class is “dangerous” — capable of irreversible or out-of-sandbox harm, so it should be gated for an agent.
Sourcepub fn all() -> [Effect; 8]
pub fn all() -> [Effect; 8]
Every effect class, in danger order (harmless → most dangerous). The enumerator for building a complete ontology over the taxonomy.