pub trait ServerRequestDispatcher: Send + Sync {
// Required methods
fn send_elicitation<'life0, 'async_trait>(
&'life0 self,
request: ElicitRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ElicitResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_ping<'life0, 'async_trait>(
&'life0 self,
request: PingRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<PingResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_create_message<'life0, 'async_trait>(
&'life0 self,
request: CreateMessageRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<CreateMessageResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_list_roots<'life0, 'async_trait>(
&'life0 self,
request: ListRootsRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ListRootsResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn supports_bidirectional(&self) -> bool;
fn get_client_capabilities<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Server request dispatcher trait for server-initiated requests
Required Methods§
Sourcefn send_elicitation<'life0, 'async_trait>(
&'life0 self,
request: ElicitRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ElicitResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_elicitation<'life0, 'async_trait>(
&'life0 self,
request: ElicitRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ElicitResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send an elicitation request to the client
Sourcefn send_ping<'life0, 'async_trait>(
&'life0 self,
request: PingRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<PingResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_ping<'life0, 'async_trait>(
&'life0 self,
request: PingRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<PingResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a ping request to the client
Sourcefn send_create_message<'life0, 'async_trait>(
&'life0 self,
request: CreateMessageRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<CreateMessageResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_create_message<'life0, 'async_trait>(
&'life0 self,
request: CreateMessageRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<CreateMessageResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a sampling create message request to the client
Sourcefn send_list_roots<'life0, 'async_trait>(
&'life0 self,
request: ListRootsRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ListRootsResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_list_roots<'life0, 'async_trait>(
&'life0 self,
request: ListRootsRequest,
ctx: RequestContext,
) -> Pin<Box<dyn Future<Output = ServerResult<ListRootsResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a roots list request to the client
Sourcefn supports_bidirectional(&self) -> bool
fn supports_bidirectional(&self) -> bool
Check if client supports bidirectional communication
Sourcefn get_client_capabilities<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_client_capabilities<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ServerResult<Option<Value>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get client capabilities