Struct ethcontract::prelude::Http
source · pub struct Http { /* private fields */ }Expand description
HTTP Transport
Implementations§
source§impl Http
impl Http
sourcepub fn new(url: &str) -> Result<Http, Error>
pub fn new(url: &str) -> Result<Http, Error>
Create new HTTP transport connecting to given URL.
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.
sourcepub fn with_client(client: Client, url: Url) -> Http
pub fn with_client(client: Client, url: Url) -> Http
Like new but with a user provided client instance.
Trait Implementations§
source§impl BatchTransport for Http
impl BatchTransport for Http
source§impl Transport for Http
impl Transport for Http
Auto Trait Implementations§
impl Freeze for Http
impl !RefUnwindSafe for Http
impl Send for Http
impl Sync for Http
impl Unpin for Http
impl !UnwindSafe for Http
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