pub enum ToolError {
UnknownTool(String),
InvalidParams(String, String),
Execution {
tool_name: String,
message: String,
},
Cancelled(String),
Timeout(String),
DeniedByUser(String),
InternalError(String),
Io {
tool_name: String,
message: String,
},
Serialization(String),
Http(String),
Regex(String),
McpConnectionFailed {
server_name: String,
message: String,
},
}Variants§
UnknownTool(String)
InvalidParams(String, String)
Execution
Cancelled(String)
Timeout(String)
DeniedByUser(String)
InternalError(String)
Io
Serialization(String)
Http(String)
Regex(String)
McpConnectionFailed
Implementations§
Source§impl ToolError
impl ToolError
pub fn execution<T: Into<String>, M: Into<String>>( tool_name: T, message: M, ) -> Self
pub fn io<T: Into<String>, M: Into<String>>(tool_name: T, message: M) -> Self
pub fn invalid_params<T: Into<String>, M: Into<String>>( tool_name: T, message: M, ) -> Self
pub fn mcp_connection_failed<T: Into<String>, M: Into<String>>( server_name: T, message: M, ) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolError
impl<'de> Deserialize<'de> for ToolError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Error for ToolError
impl Error for ToolError
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<ToolError> for ToolResult
impl From<ToolError> for ToolResult
Auto Trait Implementations§
impl Freeze for ToolError
impl RefUnwindSafe for ToolError
impl Send for ToolError
impl Sync for ToolError
impl Unpin for ToolError
impl UnwindSafe for ToolError
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