#[non_exhaustive]pub enum EnvironmentClass {
Development,
Staging,
Production,
Custom {
name: String,
risk_threshold: f64,
},
}Expand description
Environment class determines base governance rules.
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.
Development
Full autonomy. Agents can experiment freely. Risk threshold: 0.9 (almost anything allowed).
Staging
Deployed builds, automated testing. Agents test but do not innovate. Risk threshold: 0.6 (moderate gating).
Production
Live systems. Strong gating, human approval for high-risk actions. Risk threshold: 0.3 (strict gating).
Custom
Custom environment with explicit risk threshold.
Implementations§
Source§impl EnvironmentClass
impl EnvironmentClass
Sourcepub fn risk_threshold(&self) -> f64
pub fn risk_threshold(&self) -> f64
Get the default risk threshold for this environment class.
Trait Implementations§
Source§impl Clone for EnvironmentClass
impl Clone for EnvironmentClass
Source§fn clone(&self) -> EnvironmentClass
fn clone(&self) -> EnvironmentClass
Returns a duplicate of the value. Read more
1.0.0 · 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 EnvironmentClass
impl Debug for EnvironmentClass
Source§impl<'de> Deserialize<'de> for EnvironmentClass
impl<'de> Deserialize<'de> for EnvironmentClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EnvironmentClass
impl Display for EnvironmentClass
Source§impl PartialEq for EnvironmentClass
impl PartialEq for EnvironmentClass
Source§impl Serialize for EnvironmentClass
impl Serialize for EnvironmentClass
impl StructuralPartialEq for EnvironmentClass
Auto Trait Implementations§
impl Freeze for EnvironmentClass
impl RefUnwindSafe for EnvironmentClass
impl Send for EnvironmentClass
impl Sync for EnvironmentClass
impl Unpin for EnvironmentClass
impl UnsafeUnpin for EnvironmentClass
impl UnwindSafe for EnvironmentClass
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<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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.