pub enum FoundryMcpError {
InvalidParams {
message: String,
},
CliCommand {
source: Error,
},
Serialization {
source: Error,
},
Filesystem {
source: Error,
},
Transport {
message: String,
},
Internal {
message: String,
},
}
Expand description
Comprehensive error type for Foundry MCP server operations
Variants§
InvalidParams
Parameter validation errors (invalid input parameters)
CliCommand
CLI command execution errors
Serialization
JSON serialization/deserialization errors
Filesystem
File system operation errors
Transport
Transport layer errors
Internal
Internal server errors
Implementations§
Source§impl FoundryMcpError
Utility function to create parameter validation errors
impl FoundryMcpError
Utility function to create parameter validation errors
pub fn invalid_params<S: Into<String>>(message: S) -> Self
pub fn transport_error<S: Into<String>>(message: S) -> Self
pub fn internal_error<S: Into<String>>(message: S) -> Self
Trait Implementations§
Source§impl Debug for FoundryMcpError
impl Debug for FoundryMcpError
Source§impl Display for FoundryMcpError
impl Display for FoundryMcpError
Source§impl Error for FoundryMcpError
impl Error for FoundryMcpError
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 FoundryMcpError
impl From<Error> for FoundryMcpError
Source§impl From<Error> for FoundryMcpError
impl From<Error> for FoundryMcpError
Source§impl From<Error> for FoundryMcpError
impl From<Error> for FoundryMcpError
Source§impl From<FoundryMcpError> for CallToolError
Convert FoundryMcpError to CallToolError for MCP protocol compliance
impl From<FoundryMcpError> for CallToolError
Convert FoundryMcpError to CallToolError for MCP protocol compliance
Source§fn from(err: FoundryMcpError) -> Self
fn from(err: FoundryMcpError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FoundryMcpError
impl !RefUnwindSafe for FoundryMcpError
impl Send for FoundryMcpError
impl Sync for FoundryMcpError
impl Unpin for FoundryMcpError
impl !UnwindSafe for FoundryMcpError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.