pub struct Server;Expand description
The MCP server role - provides tools and resources to MCP clients.
Implementations§
Trait Implementations§
Source§impl HasPeer<Server> for Server
impl HasPeer<Server> for Server
Source§fn remote_style(&self, _peer: Server) -> RemoteStyle
fn remote_style(&self, _peer: Server) -> RemoteStyle
Returns the remote style for sending to this peer.
Source§impl Ord for Server
impl Ord for Server
Source§impl PartialOrd for Server
impl PartialOrd for Server
Source§impl Role for Server
impl Role for Server
Source§type Counterpart = Client
type Counterpart = Client
The role that this endpoint connects to. Read more
Source§fn counterpart(&self) -> Self::Counterpart
fn counterpart(&self) -> Self::Counterpart
Returns the counterpart role.
Source§async fn default_handle_dispatch_from(
&self,
message: Dispatch,
_connection: ConnectionTo<Self>,
) -> Result<Handled<Dispatch>, Error>
async fn default_handle_dispatch_from( &self, message: Dispatch, _connection: ConnectionTo<Self>, ) -> Result<Handled<Dispatch>, Error>
Method invoked when there is no defined message handler.
impl Copy for Server
impl Eq for Server
impl StructuralPartialEq for Server
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnsafeUnpin for Server
impl UnwindSafe for Server
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