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§
Sourcefn 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 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".