pub struct ServerHttpRequestCancellation { /* private fields */ }Expand description
Cancellation view shared by one public HTTP response body and its MCP request authority.
Implementations§
Source§impl ServerHttpRequestCancellation
impl ServerHttpRequestCancellation
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Returns whether peer body closure or MCP request cancellation won.
Sourcepub fn request_id(&self) -> &RequestId
pub fn request_id(&self) -> &RequestId
Returns the exact JSON-RPC request ID owned by this response body.
Sourcepub fn checkpoint(&self, cx: &Cx) -> Result<(), TransportError>
pub fn checkpoint(&self, cx: &Cx) -> Result<(), TransportError>
Checks caller, transport-body, and MCP request cancellation together.
§Errors
Returns the transport’s cancellation error, or TransportError::Cancelled
when MCP cancellation has closed the response body.
Trait Implementations§
Source§impl Clone for ServerHttpRequestCancellation
impl Clone for ServerHttpRequestCancellation
Source§fn clone(&self) -> ServerHttpRequestCancellation
fn clone(&self) -> ServerHttpRequestCancellation
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 !RefUnwindSafe for ServerHttpRequestCancellation
impl !UnwindSafe for ServerHttpRequestCancellation
impl Freeze for ServerHttpRequestCancellation
impl Send for ServerHttpRequestCancellation
impl Sync for ServerHttpRequestCancellation
impl Unpin for ServerHttpRequestCancellation
impl UnsafeUnpin for ServerHttpRequestCancellation
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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).