Skip to main content

DaemonDispatch

Trait DaemonDispatch 

Source
pub trait DaemonDispatch:
    Clone
    + Send
    + Sync
    + 'static {
    // Required methods
    fn dispatch<'life0, 'async_trait>(
        &'life0 self,
        ops: String,
        presentation: Option<String>,
        presentation_per_op: Option<Vec<Option<String>>>,
    ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn warm_all<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn namespace(&self) -> &str;
}
Expand description

Transport-agnostic dispatch interface for the daemon server.

The MCP crate implements this by wrapping dispatch_request_local; any future transport can do the same.

Required Methods§

Source

fn dispatch<'life0, 'async_trait>( &'life0 self, ops: String, presentation: Option<String>, presentation_per_op: Option<Vec<Option<String>>>, ) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dispatch a verb-DSL request string and return the JSON result.

Source

fn warm_all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Warm every pack’s in-memory state (ANN indexes, etc.).

Source

fn namespace(&self) -> &str

The namespace this dispatcher was configured for.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§