pub enum CoreError {
Tool(String),
Memory(String),
Governance(String),
RateLimited(String),
CircuitBreaker(String),
InvalidArgs(String),
NotFound(String),
Polyglot(String),
Io(Error),
Serde(Error),
Internal(String),
}Expand description
Core error type covering all WhiteMagic failure modes.
Variants§
Tool(String)
Tool execution failed
Memory(String)
Memory operation failed
Governance(String)
Governance rule violation
RateLimited(String)
Rate limit exceeded
CircuitBreaker(String)
Circuit breaker open
InvalidArgs(String)
Invalid arguments
NotFound(String)
Resource not found
Polyglot(String)
Polyglot bridge error
Io(Error)
I/O error
Serde(Error)
Serialization error
Internal(String)
Internal error (should not happen in normal operation)
Implementations§
Source§impl CoreError
impl CoreError
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Whether this error is retryable.
Sourcepub const fn is_governance(&self) -> bool
pub const fn is_governance(&self) -> bool
Whether this error indicates a governance violation.
Trait Implementations§
Source§impl Error for CoreError
impl Error for CoreError
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 !RefUnwindSafe for CoreError
impl !UnwindSafe for CoreError
impl Freeze for CoreError
impl Send for CoreError
impl Sync for CoreError
impl Unpin for CoreError
impl UnsafeUnpin for CoreError
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