struct McpRequestCancellationBridge {
stop: Arc<AtomicBool>,
monitor: Option<JoinHandle<()>>,
context: Option<RequestContext<RoleServer>>,
}Expand description
Bridge one RMCP request cancellation token into synchronous index work.
Fields§
§stop: Arc<AtomicBool>Signal used to stop the request-local cancellation monitor.
monitor: Option<JoinHandle<()>>Join handle for the bounded request-local monitor thread.
context: Option<RequestContext<RoleServer>>Owned RMCP request context retained for the final cancellation check.
Implementations§
Source§impl McpRequestCancellationBridge
impl McpRequestCancellationBridge
Sourcefn start(
context: RequestContext<RoleServer>,
control: &IndexWorkControl,
) -> Result<Self, CliError>
fn start( context: RequestContext<RoleServer>, control: &IndexWorkControl, ) -> Result<Self, CliError>
Start a request-local monitor from one owned RMCP context.
Sourcefn start_with_probe_and_context<P>(
probe: P,
control: &IndexWorkControl,
context: Option<RequestContext<RoleServer>>,
) -> Result<Self, CliError>
fn start_with_probe_and_context<P>( probe: P, control: &IndexWorkControl, context: Option<RequestContext<RoleServer>>, ) -> Result<Self, CliError>
Start a cancellation monitor and retain its owning request context.
Sourcefn is_cancelled(&self) -> bool
fn is_cancelled(&self) -> bool
Return whether RMCP canceled the owning request.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpRequestCancellationBridge
impl !RefUnwindSafe for McpRequestCancellationBridge
impl Send for McpRequestCancellationBridge
impl Sync for McpRequestCancellationBridge
impl Unpin for McpRequestCancellationBridge
impl !UnwindSafe for McpRequestCancellationBridge
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more