pub struct WebSocketTransport { /* private fields */ }Expand description
WebSocket transport
Implementations§
Source§impl WebSocketTransport
impl WebSocketTransport
pub async fn connect(url: &str) -> Result<WebSocketTransport, Error>
pub async fn request( &self, req: JsonRpcRequest, ) -> Result<JsonRpcResponse, Error>
pub async fn notify(&self, notif: JsonRpcNotification) -> Result<(), Error>
pub async fn close(&self) -> Result<(), Error>
pub fn is_connected(&self) -> bool
Auto Trait Implementations§
impl Freeze for WebSocketTransport
impl !RefUnwindSafe for WebSocketTransport
impl Send for WebSocketTransport
impl Sync for WebSocketTransport
impl Unpin for WebSocketTransport
impl !UnwindSafe for WebSocketTransport
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