pub struct CallToolError(pub Box<dyn Error>);
Expand description
A specific error type that can hold any kind of error and is used to
encapsulate various error scenarios when a CallToolRequest
fails.
Tuple Fields§
§0: Box<dyn Error>
Implementations§
Source§impl CallToolError
impl CallToolError
Trait Implementations§
Source§impl Debug for CallToolError
impl Debug for CallToolError
Source§impl Display for CallToolError
impl Display for CallToolError
Source§impl Error for CallToolError
impl Error for CallToolError
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<CallToolError> for CallToolResult
Conversion of CallToolError
into a CallToolResult
with an error.
impl From<CallToolError> for CallToolResult
Conversion of CallToolError
into a CallToolResult
with an error.
Source§fn from(value: CallToolError) -> Self
fn from(value: CallToolError) -> Self
Converts to this type from the input type.
Source§impl From<CallToolError> for RpcError
Converts a CallToolError
into a RpcError
.
impl From<CallToolError> for RpcError
Converts a CallToolError
into a RpcError
.
The conversion creates an internal error variant of RpcError
and attaches the string representation of the original CallToolError
as a message.
Source§fn from(value: CallToolError) -> Self
fn from(value: CallToolError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CallToolError
impl !RefUnwindSafe for CallToolError
impl !Send for CallToolError
impl !Sync for CallToolError
impl Unpin for CallToolError
impl !UnwindSafe for CallToolError
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