pub struct Client { /* fields omitted */ }
A client that can issue requests to a horizon api.
Constructs a new stellar client.
use tokio_core::reactor::Core;
use stellar_client::async::Client;
let core = Core::new().unwrap();
let client = Client::new("https://horizon-testnet.stellar.org", &core.handle()).unwrap();
Constructs a new stellar client connected to the horizon test network.
use tokio_core::reactor::Core;
use stellar_client::async::Client;
let core = Core::new().unwrap();
let client = Client::horizon_test(&core.handle()).unwrap();
Returns true if this is a test client.
let client = Client::horizon_test(&core.handle()).unwrap();
assert!(!client.is_horizon());
assert!(client.is_horizon_test());
Constructs a new stellar client connected to the horizon prod network.
use tokio_core::reactor::Core;
use stellar_client::async::Client;
let core = Core::new().unwrap();
let client = Client::horizon(&core.handle()).unwrap();
Returns true if this is a horizon@stellar client.
let client = Client::horizon(&core.handle()).unwrap();
assert!(client.is_horizon());
assert!(!client.is_horizon_test());
Formats the value using the given formatter. Read more
Performs copy-assignment from source
. Read more