pub enum FastMcpError {
DuplicateTool(String),
ToolNotFound(String),
DuplicateResource(String),
ResourceNotFound(String),
DuplicatePrompt(String),
PromptNotFound(String),
InvalidInvocation(String),
HandlerError(String),
Serialization(Error),
Io(Error),
}Expand description
Errors surfaced by the FastMCP Rust prototype.
Variants§
DuplicateTool(String)
ToolNotFound(String)
DuplicateResource(String)
ResourceNotFound(String)
DuplicatePrompt(String)
PromptNotFound(String)
InvalidInvocation(String)
HandlerError(String)
Serialization(Error)
Io(Error)
Implementations§
Source§impl FastMcpError
impl FastMcpError
Sourcepub fn handler_error(err: impl Display) -> Self
pub fn handler_error(err: impl Display) -> Self
Convenience helper for building handler errors from any displayable type.
Trait Implementations§
Source§impl Debug for FastMcpError
impl Debug for FastMcpError
Source§impl Display for FastMcpError
impl Display for FastMcpError
Source§impl Error for FastMcpError
impl Error for FastMcpError
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 FastMcpError
impl From<Error> for FastMcpError
Source§impl From<Error> for FastMcpError
impl From<Error> for FastMcpError
Source§impl From<FastMcpError> for HttpError
impl From<FastMcpError> for HttpError
Source§fn from(err: FastMcpError) -> Self
fn from(err: FastMcpError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FastMcpError
impl !RefUnwindSafe for FastMcpError
impl Send for FastMcpError
impl Sync for FastMcpError
impl Unpin for FastMcpError
impl UnsafeUnpin for FastMcpError
impl !UnwindSafe for FastMcpError
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