pub trait ServerTransport: Send + Sync {
// Required methods
fn read_message<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Result<JsonRpcMessage>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn write_message<'life0, 'async_trait>(
&'life0 mut self,
msg: JsonRpcMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
Sourcefn read_message<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Result<JsonRpcMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_message<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Option<Result<JsonRpcMessage>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Reads a JSON-RPC message (could be a Request or Notification)
Sourcefn write_message<'life0, 'async_trait>(
&'life0 mut self,
msg: JsonRpcMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_message<'life0, 'async_trait>(
&'life0 mut self,
msg: JsonRpcMessage,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends a JSON-RPC message (usually a Response)