pub struct RoleServer;Available on crate feature
server and (crate features client or server) only.Trait Implementations§
Source§impl Clone for RoleServer
impl Clone for RoleServer
Source§fn clone(&self) -> RoleServer
fn clone(&self) -> RoleServer
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 Debug for RoleServer
impl Debug for RoleServer
Source§impl Default for RoleServer
impl Default for RoleServer
Source§fn default() -> RoleServer
fn default() -> RoleServer
Returns the “default value” for a type. Read more
Source§impl PartialEq for RoleServer
impl PartialEq for RoleServer
Source§impl<H: ServerHandler> Service<RoleServer> for H
impl<H: ServerHandler> Service<RoleServer> for H
Source§async fn handle_request(
&self,
request: <RoleServer as ServiceRole>::PeerReq,
context: RequestContext<RoleServer>,
) -> Result<<RoleServer as ServiceRole>::Resp, McpError>
async fn handle_request( &self, request: <RoleServer as ServiceRole>::PeerReq, context: RequestContext<RoleServer>, ) -> Result<<RoleServer as ServiceRole>::Resp, McpError>
Available on crate features
client or server only.Source§async fn handle_notification(
&self,
notification: <RoleServer as ServiceRole>::PeerNot,
context: NotificationContext<RoleServer>,
) -> Result<(), McpError>
async fn handle_notification( &self, notification: <RoleServer as ServiceRole>::PeerNot, context: NotificationContext<RoleServer>, ) -> Result<(), McpError>
Available on crate features
client or server only.Source§fn get_info(&self) -> <RoleServer as ServiceRole>::Info
fn get_info(&self) -> <RoleServer as ServiceRole>::Info
Available on crate features
client or server only.Source§impl<S> Service<RoleServer> for Router<S>where
S: ServerHandler,
impl<S> Service<RoleServer> for Router<S>where
S: ServerHandler,
Source§async fn handle_notification(
&self,
notification: <RoleServer as ServiceRole>::PeerNot,
context: NotificationContext<RoleServer>,
) -> Result<(), ErrorData>
async fn handle_notification( &self, notification: <RoleServer as ServiceRole>::PeerNot, context: NotificationContext<RoleServer>, ) -> Result<(), ErrorData>
Available on crate features
client or server only.Source§async fn handle_request(
&self,
request: <RoleServer as ServiceRole>::PeerReq,
context: RequestContext<RoleServer>,
) -> Result<<RoleServer as ServiceRole>::Resp, ErrorData>
async fn handle_request( &self, request: <RoleServer as ServiceRole>::PeerReq, context: RequestContext<RoleServer>, ) -> Result<<RoleServer as ServiceRole>::Resp, ErrorData>
Available on crate features
client or server only.Source§fn get_info(&self) -> <RoleServer as ServiceRole>::Info
fn get_info(&self) -> <RoleServer as ServiceRole>::Info
Available on crate features
client or server only.Source§impl ServiceRole for RoleServer
impl ServiceRole for RoleServer
const IS_CLIENT: bool = false
type Req = ServerRequest
type Resp = ServerResult
type Not = ServerNotification
type PeerReq = ClientRequest
type PeerResp = ClientResult
type PeerNot = ClientNotification
type Info = InitializeResult
type PeerInfo = InitializeRequestParam
type InitializeError = ServerInitializeError
Source§impl Transport<RoleServer> for NeverTransport
Available on crate feature transport-streamable-http-server-session only.
impl Transport<RoleServer> for NeverTransport
Available on crate feature
transport-streamable-http-server-session only.type Error = ErrorSessionManagementNotSupported
Source§fn send(
&mut self,
_item: ServerJsonRpcMessage,
) -> impl Future<Output = Result<(), Self::Error>> + Send + 'static
fn send( &mut self, _item: ServerJsonRpcMessage, ) -> impl Future<Output = Result<(), Self::Error>> + Send + 'static
Send a message to the transport Read more
Source§fn receive(&mut self) -> impl Future<Output = Option<ClientJsonRpcMessage>>
fn receive(&mut self) -> impl Future<Output = Option<ClientJsonRpcMessage>>
Receive a message from the transport, this operation is sequential.
fn name() -> Cow<'static, str>
impl Copy for RoleServer
impl Eq for RoleServer
impl StructuralPartialEq for RoleServer
Auto Trait Implementations§
impl Freeze for RoleServer
impl RefUnwindSafe for RoleServer
impl Send for RoleServer
impl Sync for RoleServer
impl Unpin for RoleServer
impl UnwindSafe for RoleServer
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
impl<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
Source§fn serve_with_ct<T, E, A>(
self,
transport: T,
ct: CancellationToken,
) -> impl Future<Output = Result<RunningService<RoleServer, S>, ServerInitializeError>> + Send
fn serve_with_ct<T, E, A>( self, transport: T, ct: CancellationToken, ) -> impl Future<Output = Result<RunningService<RoleServer, S>, ServerInitializeError>> + Send
Available on crate features
client or server only.Source§fn into_dyn(self) -> Box<dyn DynService<R>>
fn into_dyn(self) -> Box<dyn DynService<R>>
Available on crate features
client or server only.Convert this service to a dynamic boxed service Read more
Source§fn serve<T, E, A>(
self,
transport: T,
) -> impl Future<Output = Result<RunningService<R, Self>, R::InitializeError>> + Send
fn serve<T, E, A>( self, transport: T, ) -> impl Future<Output = Result<RunningService<R, Self>, R::InitializeError>> + Send
Available on crate features
client or server only.