[][src]Struct web3_etz::transports::http::Http

pub struct Http { /* fields omitted */ }

HTTP Transport (synchronous)

Methods

impl Http[src]

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

Create new HTTP transport with given URL and spawn an event loop in a separate thread. NOTE: Dropping event loop handle will stop the transport layer!

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

Create new HTTP transport with given URL and spawn an event loop in a separate thread. You can set a maximal number of parallel requests using the second parameter. NOTE: Dropping event loop handle will stop the transport layer!

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

Create new HTTP transport with given URL and existing event loop handle.

Trait Implementations

impl Transport for Http[src]

type Out = FetchTask<fn(_: Chunk) -> 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 Http[src]

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

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

impl Clone for Http[src]

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

Performs copy-assignment from source. Read more

impl Debug for Http[src]

Auto Trait Implementations

impl Unpin for Http

impl Sync for Http

impl Send for Http

impl !UnwindSafe for Http

impl !RefUnwindSafe for Http

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<T> From<T> for T[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Erased for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.