pub enum RequestMetaError {
Absent,
Malformed,
MissingVersion,
MalformedVersion,
MissingCapabilities,
MalformedLogLevel,
MalformedCapabilities,
}Expand description
Why a _meta block could not be read.
Split by cause because the three faults have three different answers, and one error type would force every caller to re-derive which it had:
Absentis a pre-2026-07-28 request, or one from a client that negotiated an older revision. It is not a fault at all.MissingVersionandMissingCapabilitiesare SEP-2575’s own-32602 Invalid paramscases, and the suite checks them separately.MalformedVersionis the same fault with a different cause: the key was there and its value was not a revision. The spec answers that withUnsupportedProtocolVersionError— an unsupported version, not a malformed request — so it cannot collapse into the missing case.
Variants§
Absent
No _meta at all, which is the shape of every pre-2026-07-28 request.
Malformed
_meta is present and is not a JSON object.
MissingVersion
_meta names no io.modelcontextprotocol/protocolVersion.
MalformedVersion
The named version is not one this crate knows.
MissingCapabilities
_meta names no io.modelcontextprotocol/clientCapabilities.
MalformedLogLevel
io.modelcontextprotocol/logLevel is present and is not a level the
specification names.
MalformedCapabilities
The capabilities value is present and is not a JSON object.
Trait Implementations§
Source§impl Clone for RequestMetaError
impl Clone for RequestMetaError
impl Copy for RequestMetaError
Source§impl Debug for RequestMetaError
impl Debug for RequestMetaError
Source§impl Display for RequestMetaError
impl Display for RequestMetaError
impl Eq for RequestMetaError
Source§impl Error for RequestMetaError
impl Error for RequestMetaError
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 PartialEq for RequestMetaError
impl PartialEq for RequestMetaError
impl StructuralPartialEq for RequestMetaError
Auto Trait Implementations§
impl Freeze for RequestMetaError
impl RefUnwindSafe for RequestMetaError
impl Send for RequestMetaError
impl Sync for RequestMetaError
impl Unpin for RequestMetaError
impl UnsafeUnpin for RequestMetaError
impl UnwindSafe for RequestMetaError
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