pub enum McpErrorCode {
CacheMissing,
CacheInvalid,
InvalidQuery,
InvalidBudget,
IoError,
InternalError,
}Expand description
MCP error code (v0)
Variants§
Implementations§
Source§impl McpErrorCode
impl McpErrorCode
Sourcepub fn json_rpc_code(&self) -> i32
pub fn json_rpc_code(&self) -> i32
Map to the corresponding JSON-RPC 2.0 error code.
Input validation failures → -32602 (Invalid params) Server-side failures → -32603 (Internal error)
Trait Implementations§
Source§impl Clone for McpErrorCode
impl Clone for McpErrorCode
Source§fn clone(&self) -> McpErrorCode
fn clone(&self) -> McpErrorCode
Returns a duplicate of the value. Read more
1.0.0 · 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 McpErrorCode
impl Debug for McpErrorCode
Source§impl<'de> Deserialize<'de> for McpErrorCode
impl<'de> Deserialize<'de> for McpErrorCode
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 PartialEq for McpErrorCode
impl PartialEq for McpErrorCode
Source§impl Serialize for McpErrorCode
impl Serialize for McpErrorCode
impl Eq for McpErrorCode
impl StructuralPartialEq for McpErrorCode
Auto Trait Implementations§
impl Freeze for McpErrorCode
impl RefUnwindSafe for McpErrorCode
impl Send for McpErrorCode
impl Sync for McpErrorCode
impl Unpin for McpErrorCode
impl UnwindSafe for McpErrorCode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.