pub enum PolicyError {
CircuitOpen,
GateFailed(String),
ResourceLimit(String),
JidokaViolation(String),
Io(Error),
}Expand description
Policy enforcement errors.
Variants§
CircuitOpen
Circuit breaker open.
GateFailed(String)
Quality gate failed.
ResourceLimit(String)
Resource limit error.
JidokaViolation(String)
Jidoka violation.
Io(Error)
I/O error.
Implementations§
Source§impl PolicyError
impl PolicyError
Sourcepub fn gate_failed(msg: impl Into<String>) -> Self
pub fn gate_failed(msg: impl Into<String>) -> Self
Creates a gate failed error.
Sourcepub fn jidoka_violation(msg: impl Into<String>) -> Self
pub fn jidoka_violation(msg: impl Into<String>) -> Self
Creates a jidoka violation error.
Trait Implementations§
Source§impl Debug for PolicyError
impl Debug for PolicyError
Source§impl Display for PolicyError
impl Display for PolicyError
Source§impl Error for PolicyError
impl Error for PolicyError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PolicyError
impl !RefUnwindSafe for PolicyError
impl Send for PolicyError
impl Sync for PolicyError
impl Unpin for PolicyError
impl !UnwindSafe for PolicyError
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