pub enum JidokaResponse {
Continue,
Warning {
message: String,
body_index: Option<usize>,
metric: String,
current: f64,
threshold: f64,
},
Pause {
violation: OrbitJidokaViolation,
recoverable: bool,
suggestion: String,
},
Halt {
violation: OrbitJidokaViolation,
},
}Expand description
Jidoka response types with graceful degradation.
Variants§
Continue
All checks passed, continue normally.
Warning
Warning detected, continue with visual indicator.
Pause
Critical violation, pause simulation for user intervention.
Halt
Fatal unrecoverable error, halt with state snapshot.
Fields
§
violation: OrbitJidokaViolationImplementations§
Source§impl JidokaResponse
impl JidokaResponse
Sourcepub fn can_continue(&self) -> bool
pub fn can_continue(&self) -> bool
Check if this response allows continuation.
Sourcepub fn is_warning(&self) -> bool
pub fn is_warning(&self) -> bool
Check if this is a warning.
Sourcepub fn should_pause(&self) -> bool
pub fn should_pause(&self) -> bool
Check if simulation should pause.
Sourcepub fn should_halt(&self) -> bool
pub fn should_halt(&self) -> bool
Check if simulation should halt.
Trait Implementations§
Source§impl Clone for JidokaResponse
impl Clone for JidokaResponse
Source§fn clone(&self) -> JidokaResponse
fn clone(&self) -> JidokaResponse
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 JidokaResponse
impl Debug for JidokaResponse
Source§impl<'de> Deserialize<'de> for JidokaResponse
impl<'de> Deserialize<'de> for JidokaResponse
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
Auto Trait Implementations§
impl Freeze for JidokaResponse
impl RefUnwindSafe for JidokaResponse
impl Send for JidokaResponse
impl Sync for JidokaResponse
impl Unpin for JidokaResponse
impl UnsafeUnpin for JidokaResponse
impl UnwindSafe for JidokaResponse
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