pub struct ICHttp { /* private fields */ }
Expand description
HTTP Transport
Implementations§
Source§impl ICHttp
impl ICHttp
Sourcepub fn new(url: &str, max_resp: Option<u64>) -> Result<Self>
pub fn new(url: &str, max_resp: Option<u64>) -> Result<Self>
Create new HTTP transport connecting to given URL, cycles: cycles amount to perform http call
Note that the http [Client] automatically enables some features like setting the basic auth header or enabling a proxy from the environment. You can customize it with [Http::with_client].
Trait Implementations§
Source§impl BatchTransport for ICHttp
impl BatchTransport for ICHttp
Source§impl Transport for ICHttp
impl Transport for ICHttp
Source§type Out = Pin<Box<dyn Future<Output = Result<Value, Error>> + Send>>
type Out = Pin<Box<dyn Future<Output = Result<Value, Error>> + Send>>
The type of future this transport returns when a call is made.
Source§fn prepare(&self, method: &str, params: Vec<Value>) -> (RequestId, Call)
fn prepare(&self, method: &str, params: Vec<Value>) -> (RequestId, Call)
Prepare serializable RPC call for given method with parameters.
Source§fn send(&self, id: RequestId, call: Call, options: CallOptions) -> Self::Out
fn send(&self, id: RequestId, call: Call, options: CallOptions) -> Self::Out
Execute prepared RPC call.
Source§fn set_max_response_bytes(&mut self, v: u64)
fn set_max_response_bytes(&mut self, v: u64)
set the max response bytes, do nothing by default
Auto Trait Implementations§
impl Freeze for ICHttp
impl RefUnwindSafe for ICHttp
impl Send for ICHttp
impl Sync for ICHttp
impl Unpin for ICHttp
impl UnwindSafe for ICHttp
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