pub struct WebsocketClient { /* private fields */ }
Expand description
A websocket JSON-RPC client.
Implementations§
Trait Implementations§
Source§impl Client for WebsocketClient
impl Client for WebsocketClient
Source§fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close the websocket connection
Source§fn send_request<'life0, 'life1, 'life2, 'async_trait, P, R>(
&'life0 self,
method: &'life1 str,
params: &'life2 P,
) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>>
fn send_request<'life0, 'life1, 'life2, 'async_trait, P, R>( &'life0 self, method: &'life1 str, params: &'life2 P, ) -> Pin<Box<dyn Future<Output = Result<R, Self::Error>> + Send + 'async_trait>>
Sends a JSON-HTTP request Read more
Source§fn connect_stream<'life0, 'async_trait, T>(
&'life0 self,
id: SubscriptionId,
) -> Pin<Box<dyn Future<Output = BoxStream<'static, T>> + Send + 'async_trait>>where
T: for<'de> Deserialize<'de> + Debug + Send + Sync + 'async_trait + Unpin + 'static,
Self: 'async_trait,
'life0: 'async_trait,
fn connect_stream<'life0, 'async_trait, T>(
&'life0 self,
id: SubscriptionId,
) -> Pin<Box<dyn Future<Output = BoxStream<'static, T>> + Send + 'async_trait>>where
T: for<'de> Deserialize<'de> + Debug + Send + Sync + 'async_trait + Unpin + 'static,
Self: 'async_trait,
'life0: 'async_trait,
If the client supports streams (i.e. receiving notifications), this should return a stream for the specific
subscription ID. Read more
Source§fn disconnect_stream<'life0, 'async_trait>(
&'life0 self,
id: SubscriptionId,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect_stream<'life0, 'async_trait>(
&'life0 self,
id: SubscriptionId,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
If the client supports streams (i.e. receiving notifications) and there is a matching subscription ID, this
should close the corresponding stream. Read more
Auto Trait Implementations§
impl !Freeze for WebsocketClient
impl !RefUnwindSafe for WebsocketClient
impl Send for WebsocketClient
impl Sync for WebsocketClient
impl Unpin for WebsocketClient
impl !UnwindSafe for WebsocketClient
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