Struct web3::transports::http::Http [−][src]
pub struct Http { /* fields omitted */ }
HTTP Transport (synchronous)
Methods
impl Http
[src]
impl Http
pub fn new(url: &str) -> Result<(EventLoopHandle, Self)>
[src]
pub fn new(url: &str) -> Result<(EventLoopHandle, Self)>
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]
pub fn with_max_parallel(
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]
pub fn with_event_loop(
url: &str,
handle: &Handle,
max_parallel: usize
) -> Result<Self>
Create new HTTP transport with given URL and existing event loop handle.
Trait Implementations
impl Debug for Http
[src]
impl Debug for Http
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Http
[src]
impl Clone for Http
fn clone(&self) -> Http
[src]
fn clone(&self) -> Http
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Transport for Http
[src]
impl Transport for Http
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 prepare(&self, method: &str, params: Vec<Value>) -> (RequestId, Call)
Prepare serializable RPC call for given method with parameters.
fn send(&self, id: RequestId, request: Call) -> Self::Out
[src]
fn send(&self, id: RequestId, request: Call) -> Self::Out
Execute prepared RPC call.
fn execute(&self, method: &str, params: Vec<Value>) -> Self::Out
[src]
fn execute(&self, method: &str, params: Vec<Value>) -> Self::Out
Execute remote method with given parameters.
impl BatchTransport for Http
[src]
impl BatchTransport for Http