pub struct BidirectionalRouter { /* private fields */ }Expand description
Bidirectional communication methods for server-initiated requests
Implementations§
Source§impl BidirectionalRouter
impl BidirectionalRouter
Sourcepub fn set_dispatcher<D>(&mut self, dispatcher: D)where
D: ServerRequestDispatcher + 'static,
pub fn set_dispatcher<D>(&mut self, dispatcher: D)where
D: ServerRequestDispatcher + 'static,
Set the server request dispatcher
Sourcepub fn get_dispatcher(&self) -> Option<&Arc<dyn ServerRequestDispatcher>>
pub fn get_dispatcher(&self) -> Option<&Arc<dyn ServerRequestDispatcher>>
Get the server request dispatcher
Sourcepub fn supports_bidirectional(&self) -> bool
pub fn supports_bidirectional(&self) -> bool
Check if bidirectional communication is supported
Sourcepub async fn send_elicitation_to_client(
&self,
request: ElicitRequest,
ctx: RequestContext,
) -> ServerResult<ElicitResult>
pub async fn send_elicitation_to_client( &self, request: ElicitRequest, ctx: RequestContext, ) -> ServerResult<ElicitResult>
Send an elicitation request to the client (server-initiated)
Sourcepub async fn send_ping_to_client(
&self,
request: PingRequest,
ctx: RequestContext,
) -> ServerResult<PingResult>
pub async fn send_ping_to_client( &self, request: PingRequest, ctx: RequestContext, ) -> ServerResult<PingResult>
Send a ping request to the client (server-initiated)
Sourcepub async fn send_create_message_to_client(
&self,
request: CreateMessageRequest,
ctx: RequestContext,
) -> ServerResult<CreateMessageResult>
pub async fn send_create_message_to_client( &self, request: CreateMessageRequest, ctx: RequestContext, ) -> ServerResult<CreateMessageResult>
Send a create message request to the client (server-initiated)
Sourcepub async fn send_list_roots_to_client(
&self,
request: ListRootsRequest,
ctx: RequestContext,
) -> ServerResult<ListRootsResult>
pub async fn send_list_roots_to_client( &self, request: ListRootsRequest, ctx: RequestContext, ) -> ServerResult<ListRootsResult>
Send a list roots request to the client (server-initiated)
Trait Implementations§
Source§impl Clone for BidirectionalRouter
impl Clone for BidirectionalRouter
Source§impl Debug for BidirectionalRouter
impl Debug for BidirectionalRouter
Auto Trait Implementations§
impl Freeze for BidirectionalRouter
impl !RefUnwindSafe for BidirectionalRouter
impl Send for BidirectionalRouter
impl Sync for BidirectionalRouter
impl Unpin for BidirectionalRouter
impl !UnwindSafe for BidirectionalRouter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more