#[non_exhaustive]pub enum AtdError {
ToolNotFound {
tool_id: String,
suggestions: Vec<String>,
},
InvalidArguments {
tool_id: String,
field: String,
reason: String,
},
CapabilityDenied {
tool_id: String,
required: Vec<String>,
granted: Vec<String>,
},
BindingUnavailable {
tool_id: String,
tried: Vec<String>,
reason: String,
},
ToolExecutionFailed {
tool_id: String,
inner: Box<dyn Error + Send + Sync>,
},
Timeout {
tool_id: String,
after_ms: u64,
},
ServerUnreachable(Error),
NotImplemented {
feature: String,
},
ProtocolError {
expected: String,
got: String,
},
PaginationLimitExceeded {
pages_fetched: u32,
bytes_fetched: usize,
},
MergeFailed {
reason: String,
},
}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.
ToolNotFound
InvalidArguments
CapabilityDenied
ToolExecutionFailed
Timeout
ServerUnreachable(Error)
NotImplemented
ProtocolError
PaginationLimitExceeded
SP-pagination-v1 §4.8 — AtdClient::call_all hit either max_pages
or max_total_bytes before exhausting cursors. Callers can decide
whether to treat partial as success.
MergeFailed
SP-pagination-v1 §4.8 — MergePolicy couldn’t combine pages
(e.g., ConcatArray but a page wasn’t an array; ConcatField
but the named field was missing).
Implementations§
Source§impl AtdError
impl AtdError
pub fn is_retryable(&self) -> bool
pub fn suggest_fix(&self) -> Option<String>
Trait Implementations§
Source§impl Error for AtdError
impl Error for AtdError
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 AtdError
impl !RefUnwindSafe for AtdError
impl Send for AtdError
impl Sync for AtdError
impl Unpin for AtdError
impl UnsafeUnpin for AtdError
impl !UnwindSafe for AtdError
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