pub struct McpToolError {
pub code: String,
pub message: String,
pub details: Option<Value>,
}Expand description
An error result with a machine-readable code.
Fields§
§code: String§message: String§details: Option<Value>Implementations§
Trait Implementations§
Source§impl Clone for McpToolError
impl Clone for McpToolError
Source§fn clone(&self) -> McpToolError
fn clone(&self) -> McpToolError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 McpToolError
impl Debug for McpToolError
Source§impl Display for McpToolError
impl Display for McpToolError
Source§impl Error for McpToolError
impl Error for McpToolError
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<Error> for McpToolError
Arguments that do not match the type they are parsed into are invalid parameters.
impl From<Error> for McpToolError
Arguments that do not match the type they are parsed into are invalid parameters.
Source§impl From<McpToolError> for McpToolResult
impl From<McpToolError> for McpToolResult
Source§fn from(error: McpToolError) -> Self
fn from(error: McpToolError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for McpToolError
impl PartialEq for McpToolError
Source§fn eq(&self, other: &McpToolError) -> bool
fn eq(&self, other: &McpToolError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for McpToolError
Auto Trait Implementations§
impl Freeze for McpToolError
impl RefUnwindSafe for McpToolError
impl Send for McpToolError
impl Sync for McpToolError
impl Unpin for McpToolError
impl UnsafeUnpin for McpToolError
impl UnwindSafe for McpToolError
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