pub enum CoreResult {
Legacy(LegacyCoreResult),
Final(FinalCoreResult),
}Expand description
Public, era-aware dispatch for core results.
Variants§
Legacy(LegacyCoreResult)
Exact MCP 2024-11-05 result vocabulary.
Final(FinalCoreResult)
Final MCP 2026-07-28 complete-result vocabulary.
Implementations§
Source§impl CoreResult
impl CoreResult
Sourcepub const fn era(&self) -> ProtocolEra
pub const fn era(&self) -> ProtocolEra
Returns the era selected by this result.
Sourcepub const fn method(&self) -> &'static str
pub const fn method(&self) -> &'static str
Returns the exact method literal that selected this result type.
Sourcepub fn encode(&self) -> Result<String, CoreDispatchError>
pub fn encode(&self) -> Result<String, CoreDispatchError>
Encodes this typed result without a JSON-RPC response envelope.
Trait Implementations§
Source§impl Clone for CoreResult
impl Clone for CoreResult
Source§fn clone(&self) -> CoreResult
fn clone(&self) -> CoreResult
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 moreAuto Trait Implementations§
impl Freeze for CoreResult
impl RefUnwindSafe for CoreResult
impl Send for CoreResult
impl Sync for CoreResult
impl Unpin for CoreResult
impl UnsafeUnpin for CoreResult
impl UnwindSafe for CoreResult
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).