pub enum CapabilityError {
Unavailable(String),
InvalidInput(String),
ExecutionFailed(String),
}Expand description
Errors that can occur when interacting with capabilities.
This enum is used as the error type across all capability traits
(Invocable, ResourceProvider, PromptProvider).
Variants§
The requested capability, resource, or prompt is not available.
Returned when the identifier does not match any registered item or when the provider is temporarily offline.
InvalidInput(String)
The input provided to the capability is invalid.
Returned when the model-supplied arguments fail schema validation or contain values outside the expected domain.
ExecutionFailed(String)
The capability encountered an error during execution.
Returned for runtime failures such as network timeouts, I/O errors, or unexpected backend responses.
Trait Implementations§
Source§impl Debug for CapabilityError
impl Debug for CapabilityError
Source§impl Display for CapabilityError
impl Display for CapabilityError
Source§impl Error for CapabilityError
impl Error for CapabilityError
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()
Auto Trait Implementations§
impl Freeze for CapabilityError
impl RefUnwindSafe for CapabilityError
impl Send for CapabilityError
impl Sync for CapabilityError
impl Unpin for CapabilityError
impl UnsafeUnpin for CapabilityError
impl UnwindSafe for CapabilityError
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