pub struct ProxyClient { /* private fields */ }Expand description
MCP client handler for the upstream server connection.
ProxyClient maintains the peer handle to the upstream MCP server. It
implements ClientHandler with default behavior — no custom notification
handling is needed since all filtering happens on the server side.
§Examples
let client = ProxyClient::new();Implementations§
Source§impl ProxyClient
impl ProxyClient
Trait Implementations§
Source§impl ClientHandler for ProxyClient
impl ClientHandler for ProxyClient
fn get_info(&self) -> ClientInfo
fn get_peer(&self) -> Option<Peer<RoleClient>>
fn set_peer(&mut self, peer: Peer<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
fn on_cancelled( &self, params: CancelledNotificationParam, ) -> impl Future<Output = ()> + Send
fn on_progress( &self, params: ProgressNotificationParam, ) -> impl Future<Output = ()> + Send
fn on_logging_message( &self, params: LoggingMessageNotificationParam, ) -> impl Future<Output = ()> + Send
fn on_resource_updated( &self, params: ResourceUpdatedNotificationParam, ) -> impl Future<Output = ()> + Send
fn on_resource_list_changed(&self) -> impl Future<Output = ()> + Send
fn on_tool_list_changed(&self) -> impl Future<Output = ()> + Send
fn on_prompt_list_changed(&self) -> impl Future<Output = ()> + Send
Source§impl Clone for ProxyClient
impl Clone for ProxyClient
Source§fn clone(&self) -> ProxyClient
fn clone(&self) -> ProxyClient
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 moreSource§impl Default for ProxyClient
impl Default for ProxyClient
Source§fn default() -> ProxyClient
fn default() -> ProxyClient
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProxyClient
impl !RefUnwindSafe for ProxyClient
impl Send for ProxyClient
impl Sync for ProxyClient
impl Unpin for ProxyClient
impl UnsafeUnpin for ProxyClient
impl !UnwindSafe for ProxyClient
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, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
fn get_peer(&self) -> Option<Peer<R>>
fn set_peer(&mut self, peer: Peer<R>)
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<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, ) -> Result<(), ErrorData>
fn get_peer(&self) -> Option<Peer<RoleClient>>
fn set_peer(&mut self, peer: Peer<RoleClient>)
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>, E>> + 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