Skip to main content

McpRequestOwner

Trait McpRequestOwner 

Source
pub trait McpRequestOwner: Send + Sync {
    // Required method
    fn run_owned(
        &self,
        transaction_id: TransactionId,
        work: Pin<Box<dyn Future<Output = Response<Body>> + Send>>,
    ) -> Pin<Box<dyn Future<Output = Response<Body>> + Send>>;
}
Expand description

Runs one MCP HTTP request under TaskSupervisor as TaskClass::McpRequest (§17).

Injected by RuntimeOwner; standalone prepare+serve tests leave this unset and execute request work inline.

Required Methods§

Source

fn run_owned( &self, transaction_id: TransactionId, work: Pin<Box<dyn Future<Output = Response<Body>> + Send>>, ) -> Pin<Box<dyn Future<Output = Response<Body>> + Send>>

Own work for transaction_id and return its response.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§