[][src]Struct web3::transports::ws::WebSocket

pub struct WebSocket { /* fields omitted */ }

WebSocket transport

Methods

impl WebSocket[src]

pub fn new(url: &str) -> Result<(EventLoopHandle, Self)>[src]

Create new WebSocket transport with separate event loop. NOTE: Dropping event loop handle will stop the transport layer!

pub fn with_event_loop(url: &str, handle: &Handle) -> Result<Self>[src]

Create new WebSocket transport within existing Event Loop.

Trait Implementations

impl Transport for WebSocket[src]

type Out = WsTask<fn(_: Vec<Result<Value>>) -> Result<Value>>

The type of future this transport returns when a call is made.

fn execute(&self, method: &str, params: Vec<Value>) -> Self::Out[src]

Execute remote method with given parameters.

impl BatchTransport for WebSocket[src]

type Batch = WsTask<fn(_: Vec<Result<Value>>) -> Result<Vec<Result<Value>>>>

The type of future this transport returns when a call is made.

impl DuplexTransport for WebSocket[src]

type NotificationStream = Box<dyn Stream<Item = Value, Error = Error> + Send + 'static>

The type of stream this transport returns

impl Clone for WebSocket[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for WebSocket[src]

Auto Trait Implementations

impl Send for WebSocket

impl Sync for WebSocket

Blanket Implementations

impl<X, T> Transport for X where
    T: Transport + ?Sized,
    X: Deref<Target = T> + Debug + Clone
[src]

type Out = <T as Transport>::Out

The type of future this transport returns when a call is made.

fn execute(&self, method: &str, params: Vec<Value>) -> Self::Out[src]

Execute remote method with given parameters.

impl<X, T> BatchTransport for X where
    T: BatchTransport + ?Sized,
    X: Deref<Target = T> + Debug + Clone
[src]

type Batch = <T as BatchTransport>::Batch

The type of future this transport returns when a call is made.

impl<X, T> DuplexTransport for X where
    T: DuplexTransport + ?Sized,
    X: Deref<Target = T> + Debug + Clone
[src]

type NotificationStream = <T as DuplexTransport>::NotificationStream

The type of stream this transport returns

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.