pub trait RequestWriter {
// Required methods
fn write_request<'life0, 'async_trait, R, P>(
&'life0 mut self,
params: Option<R::Params>,
) -> Pin<Box<dyn Future<Output = Result<Response<R::Result>, Error>> + 'async_trait>>
where R: 'async_trait + Request<Params = P>,
P: 'async_trait + Serialize + DeserializeOwned + Debug,
Self: 'async_trait,
'life0: 'async_trait;
fn write_notification<'life0, 'async_trait, N, P>(
&'life0 mut self,
params: Option<N::Params>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where N: 'async_trait + Notification<Params = P>,
P: 'async_trait + Serialize + DeserializeOwned + Debug,
Self: 'async_trait,
'life0: 'async_trait;
fn cancel<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
fn write_request<'life0, 'async_trait, R, P>(
&'life0 mut self,
params: Option<R::Params>,
) -> Pin<Box<dyn Future<Output = Result<Response<R::Result>, Error>> + 'async_trait>>where
R: 'async_trait + Request<Params = P>,
P: 'async_trait + Serialize + DeserializeOwned + Debug,
Self: 'async_trait,
'life0: 'async_trait,
fn write_notification<'life0, 'async_trait, N, P>(
&'life0 mut self,
params: Option<N::Params>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
N: 'async_trait + Notification<Params = P>,
P: 'async_trait + Serialize + DeserializeOwned + Debug,
Self: 'async_trait,
'life0: 'async_trait,
fn cancel<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.