pub enum AinlRuntimeError {
DelegationDepthExceeded {
depth: u32,
max: u32,
},
Message(String),
AsyncJoinError(String),
AsyncStoreError(String),
}Expand description
Hard failure for crate::AinlRuntime::run_turn (store open, invalid graph, invalid compile input, etc.).
Variants§
DelegationDepthExceeded
Nested crate::AinlRuntime::run_turn exceeded crate::RuntimeConfig::max_delegation_depth.
Message(String)
AsyncJoinError(String)
tokio::task::spawn_blocking failed while running graph I/O off the async executor.
AsyncStoreError(String)
SQLite / graph store error surfaced from a blocking task in the async turn path (the graph
mutex there is std::sync::Mutex, not tokio::sync::Mutex; see crate README.md).
Implementations§
Source§impl AinlRuntimeError
impl AinlRuntimeError
Sourcepub fn message_str(&self) -> Option<&str>
pub fn message_str(&self) -> Option<&str>
Borrow the payload when this is a Self::Message error (graph validation, missing agent_id, etc.).
pub fn is_delegation_depth_exceeded(&self) -> bool
pub fn is_async_join_error(&self) -> bool
pub fn is_async_store_error(&self) -> bool
Sourcepub fn delegation_depth_exceeded(&self) -> Option<(u32, u32)>
pub fn delegation_depth_exceeded(&self) -> Option<(u32, u32)>
If this is Self::DelegationDepthExceeded, returns (depth, max).
Trait Implementations§
Source§impl Clone for AinlRuntimeError
impl Clone for AinlRuntimeError
Source§fn clone(&self) -> AinlRuntimeError
fn clone(&self) -> AinlRuntimeError
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 AinlRuntimeError
impl Debug for AinlRuntimeError
Source§impl Display for AinlRuntimeError
impl Display for AinlRuntimeError
Source§impl Error for AinlRuntimeError
impl Error for AinlRuntimeError
1.30.0 · 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()
Source§impl From<String> for AinlRuntimeError
impl From<String> for AinlRuntimeError
Source§impl PartialEq for AinlRuntimeError
impl PartialEq for AinlRuntimeError
impl Eq for AinlRuntimeError
impl StructuralPartialEq for AinlRuntimeError
Auto Trait Implementations§
impl Freeze for AinlRuntimeError
impl RefUnwindSafe for AinlRuntimeError
impl Send for AinlRuntimeError
impl Sync for AinlRuntimeError
impl Unpin for AinlRuntimeError
impl UnsafeUnpin for AinlRuntimeError
impl UnwindSafe for AinlRuntimeError
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