pub struct SmgClientHandler { /* private fields */ }Implementations§
Source§impl SmgClientHandler
impl SmgClientHandler
pub fn new( server_key: impl AsRef<str>, approval_manager: Arc<ApprovalManager>, tool_inventory: Arc<ToolInventory>, ) -> Self
pub fn with_refresh_channel(self, tx: Sender<RefreshRequest>) -> Self
pub fn with_client_info(self, info: ClientInfo) -> Self
pub fn set_request_context(&self, ctx: HandlerRequestContext)
pub fn clear_request_context(&self)
pub fn request_context(&self) -> Option<HandlerRequestContext>
pub fn server_key(&self) -> &str
Trait Implementations§
Source§impl ClientHandler for SmgClientHandler
impl ClientHandler for SmgClientHandler
Source§async fn create_elicitation(
&self,
request: CreateElicitationRequestParam,
context: RequestContext<RoleClient>,
) -> Result<CreateElicitationResult, ErrorData>
async fn create_elicitation( &self, request: CreateElicitationRequestParam, context: RequestContext<RoleClient>, ) -> Result<CreateElicitationResult, ErrorData>
Handle an elicitation request from a server asking for user input. Read more
async fn on_cancelled( &self, params: CancelledNotificationParam, _context: NotificationContext<RoleClient>, )
async fn on_progress( &self, params: ProgressNotificationParam, _context: NotificationContext<RoleClient>, )
async fn on_resource_updated( &self, params: ResourceUpdatedNotificationParam, _context: NotificationContext<RoleClient>, )
async fn on_resource_list_changed( &self, _context: NotificationContext<RoleClient>, )
async fn on_tool_list_changed(&self, _context: NotificationContext<RoleClient>)
async fn on_prompt_list_changed( &self, _context: NotificationContext<RoleClient>, )
fn get_info(&self) -> ClientInfo
async fn on_logging_message( &self, params: LoggingMessageNotificationParam, _context: NotificationContext<RoleClient>, )
fn ping( &self, context: RequestContext<RoleClient>, ) -> impl Future<Output = Result<(), ErrorData>> + Send
fn create_message( &self, params: CreateMessageRequestParam, context: RequestContext<RoleClient>, ) -> impl Future<Output = Result<CreateMessageResult, ErrorData>> + Send
fn list_roots( &self, context: RequestContext<RoleClient>, ) -> impl Future<Output = Result<ListRootsResult, ErrorData>> + Send
Source§impl Clone for SmgClientHandler
impl Clone for SmgClientHandler
Source§fn clone(&self) -> SmgClientHandler
fn clone(&self) -> SmgClientHandler
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SmgClientHandler
impl !RefUnwindSafe for SmgClientHandler
impl Send for SmgClientHandler
impl Sync for SmgClientHandler
impl Unpin for SmgClientHandler
impl UnsafeUnpin for SmgClientHandler
impl !UnwindSafe for SmgClientHandler
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
fn handle_request( &self, request: <R as ServiceRole>::PeerReq, context: RequestContext<R>, ) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
fn handle_notification( &self, notification: <R as ServiceRole>::PeerNot, context: NotificationContext<R>, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
fn get_info(&self) -> <R as ServiceRole>::Info
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<H> Service<RoleClient> for Hwhere
H: ClientHandler,
impl<H> Service<RoleClient> for Hwhere
H: ClientHandler,
async fn handle_request( &self, request: <RoleClient as ServiceRole>::PeerReq, context: RequestContext<RoleClient>, ) -> Result<<RoleClient as ServiceRole>::Resp, ErrorData>
async fn handle_notification( &self, notification: <RoleClient as ServiceRole>::PeerNot, context: NotificationContext<RoleClient>, ) -> Result<(), ErrorData>
fn get_info(&self) -> <RoleClient as ServiceRole>::Info
Source§impl<S> ServiceExt<RoleClient> for Swhere
S: Service<RoleClient>,
impl<S> ServiceExt<RoleClient> for Swhere
S: Service<RoleClient>,
fn serve_with_ct<T, E, A>( self, transport: T, ct: CancellationToken, ) -> impl Future<Output = Result<RunningService<RoleClient, S>, ClientInitializeError>> + Send
Source§fn into_dyn(self) -> Box<dyn DynService<R>>
fn into_dyn(self) -> Box<dyn DynService<R>>
Convert this service to a dynamic boxed service Read more