pub enum ToolInvokeError<E> {
InvalidToolName(String),
InvalidCommandPath(Vec<String>),
InvalidInput(String),
ConstraintViolation(String),
InvalidResult(String),
Tool(E),
UnknownCustomError(RawCustomToolError),
ProtocolError(String),
Denied(String),
InternalError(String),
Cancelled,
ResourceExhausted(String),
}Expand description
Exact error channel shared by middleware guest dispatch and its underlying layer.
Variants§
InvalidToolName(String)
InvalidCommandPath(Vec<String>)
InvalidInput(String)
ConstraintViolation(String)
InvalidResult(String)
Tool(E)
UnknownCustomError(RawCustomToolError)
ProtocolError(String)
Denied(String)
InternalError(String)
Cancelled
ResourceExhausted(String)
Implementations§
Source§impl<E> ToolInvokeError<E>
impl<E> ToolInvokeError<E>
Sourcepub fn map_tool<F, O>(self, transform: F) -> ToolInvokeError<O>where
F: FnOnce(E) -> O,
pub fn map_tool<F, O>(self, transform: F) -> ToolInvokeError<O>where
F: FnOnce(E) -> O,
Transforms only the tool-defined custom error payload.
Trait Implementations§
Source§impl<E: Clone> Clone for ToolInvokeError<E>
impl<E: Clone> Clone for ToolInvokeError<E>
Source§impl<E: Debug> Debug for ToolInvokeError<E>
impl<E: Debug> Debug for ToolInvokeError<E>
Source§impl<E: Display> Display for ToolInvokeError<E>
impl<E: Display> Display for ToolInvokeError<E>
Source§impl<E: Error + 'static> Error for ToolInvokeError<E>
impl<E: Error + 'static> Error for ToolInvokeError<E>
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<E> From<E> for ToolInvokeError<E>
impl<E> From<E> for ToolInvokeError<E>
Source§impl<E: PartialEq> PartialEq for ToolInvokeError<E>
impl<E: PartialEq> PartialEq for ToolInvokeError<E>
impl<E: PartialEq> StructuralPartialEq for ToolInvokeError<E>
Auto Trait Implementations§
impl<E> !RefUnwindSafe for ToolInvokeError<E>
impl<E> !Send for ToolInvokeError<E>
impl<E> !Sync for ToolInvokeError<E>
impl<E> !UnwindSafe for ToolInvokeError<E>
impl<E> Freeze for ToolInvokeError<E>where
E: Freeze,
impl<E> Unpin for ToolInvokeError<E>where
E: Unpin,
impl<E> UnsafeUnpin for ToolInvokeError<E>where
E: UnsafeUnpin,
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