pub trait ServerCapabilities:
Send
+ Sync
+ Debug {
// Required methods
fn create_message(
&self,
request: Value,
) -> BoxFuture<'_, Result<Value, Box<dyn Error + Send + Sync>>>;
fn elicit(
&self,
request: Value,
) -> BoxFuture<'_, Result<Value, Box<dyn Error + Send + Sync>>>;
fn list_roots(
&self,
) -> BoxFuture<'_, Result<Value, Box<dyn Error + Send + Sync>>>;
}
Expand description
Trait for server-initiated requests (sampling, elicitation, roots) This provides a type-safe way for tools to make requests to clients
Required Methods§
Sourcefn create_message(
&self,
request: Value,
) -> BoxFuture<'_, Result<Value, Box<dyn Error + Send + Sync>>>
fn create_message( &self, request: Value, ) -> BoxFuture<'_, Result<Value, Box<dyn Error + Send + Sync>>>
Send a sampling/createMessage request to the client