pub struct HttpGateway { /* private fields */ }Expand description
Holds necessary information to make http requests to the gateway.
§Example
use oasis_client::Gateway as _;
let url = "https://gateway.devnet.oasiscloud.io";
let api_key = "AAACL7PMQhh3/rxLr9KJpsAJhz5zBlpAB73uwgAt/6BQ4+Bw";
let gateway = oasis_client::HttpGatewayBuilder::new(url)
.api_key(api_key)
.build();
let address = gateway.deploy(b"service Wasm bytecode").unwrap();
let response = gateway.rpc(address, b"data").unwrap();Implementations§
Source§impl HttpGateway
impl HttpGateway
Sourcepub fn new(
url: String,
headers: HeaderMap,
polling_params: PollingParams,
) -> Self
pub fn new( url: String, headers: HeaderMap, polling_params: PollingParams, ) -> Self
Creates a new HttpGateway pointed at url and with default headers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpGateway
impl !RefUnwindSafe for HttpGateway
impl Send for HttpGateway
impl Sync for HttpGateway
impl Unpin for HttpGateway
impl !UnwindSafe for HttpGateway
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more