[−][src]Struct web3_etz::transports::http::Http
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]
url: &str,
max_parallel: usize
) -> Result<(EventLoopHandle, Self)>
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]
url: &str,
handle: &Handle,
max_parallel: usize
) -> Result<Self>
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 prepare(&self, method: &str, params: Vec<Value>) -> (RequestId, Call)
[src]
fn send(&self, id: RequestId, request: Call) -> Self::Out
[src]
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.
fn send_batch<T>(&self, requests: T) -> Self::Batch where
T: IntoIterator<Item = (RequestId, Call)>,
[src]
T: IntoIterator<Item = (RequestId, Call)>,
impl Clone for Http
[src]
fn clone(&self) -> 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]
T: Transport + ?Sized,
X: Deref<Target = T> + Debug + Clone,
type Out = <T as Transport>::Out
The type of future this transport returns when a call is made.
fn prepare(&Self, &str, Vec<Value>) -> (usize, Call)
[src]
fn send(&Self, usize, Call) -> <X as Transport>::Out
[src]
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]
T: BatchTransport + ?Sized,
X: Deref<Target = T> + Debug + Clone,
type Batch = <T as BatchTransport>::Batch
The type of future this transport returns when a call is made.
fn send_batch<I>(&Self, I) -> <X as BatchTransport>::Batch where
I: IntoIterator<Item = (usize, Call)>,
[src]
I: IntoIterator<Item = (usize, Call)>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Typeable for T where
T: Any,
T: Any,