pub struct MissingRequiredClientCapabilityError { /* private fields */ }Expand description
Typed final error data for a missing required client capability.
Implementations§
Source§impl MissingRequiredClientCapabilityError
impl MissingRequiredClientCapabilityError
Sourcepub fn from_client_capabilities(
required_capabilities: &ClientCapabilities,
) -> Result<Self, RequiredCapabilitiesError>
pub fn from_client_capabilities( required_capabilities: &ClientCapabilities, ) -> Result<Self, RequiredCapabilitiesError>
Constructs the error from the exact typed client-capabilities object.
This is the safe local constructor for a capability-gated final request: it serializes the standard typed shape without accepting a separately assembled peer-data object.
Sourcepub fn new(
required_capabilities: Value,
) -> Result<Self, RequiredCapabilitiesError>
pub fn new( required_capabilities: Value, ) -> Result<Self, RequiredCapabilitiesError>
Constructs the error from the exact required-capabilities object.
Flattened diagnostic paths deliberately do not enter peer-facing data; the exact object is retained for the final error shape instead.
Sourcepub const fn required_capabilities(&self) -> &Map<String, Value>
pub const fn required_capabilities(&self) -> &Map<String, Value>
Returns the exact required-capabilities object.
Sourcepub const fn jsonrpc_error_code(&self) -> i32
pub const fn jsonrpc_error_code(&self) -> i32
Returns the final MCP JSON-RPC missing-capability code.
Sourcepub const fn http_status(&self) -> u16
pub const fn http_status(&self) -> u16
Returns the final HTTP status for a missing client capability.
Sourcepub fn canonical_error_data(&self) -> Value
pub fn canonical_error_data(&self) -> Value
Returns the exact final peer error-data object.
Trait Implementations§
Source§impl Clone for MissingRequiredClientCapabilityError
impl Clone for MissingRequiredClientCapabilityError
Source§fn clone(&self) -> MissingRequiredClientCapabilityError
fn clone(&self) -> MissingRequiredClientCapabilityError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl StructuralPartialEq for MissingRequiredClientCapabilityError
Auto Trait Implementations§
impl Freeze for MissingRequiredClientCapabilityError
impl RefUnwindSafe for MissingRequiredClientCapabilityError
impl Send for MissingRequiredClientCapabilityError
impl Sync for MissingRequiredClientCapabilityError
impl Unpin for MissingRequiredClientCapabilityError
impl UnsafeUnpin for MissingRequiredClientCapabilityError
impl UnwindSafe for MissingRequiredClientCapabilityError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).