Struct stellar_client::client::async::Client[][src]

pub struct Client { /* fields omitted */ }

A client that can issue requests to a horizon api.

Methods

impl Client
[src]

Constructs a new stellar client.

Examples

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.

Examples

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.

Examples

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.

Examples

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.

Examples

let client = Client::horizon(&core.handle()).unwrap();
assert!(client.is_horizon());
assert!(!client.is_horizon_test());

Trait Implementations

impl Debug for Client
[src]

Formats the value using the given formatter. Read more

impl Clone for Client
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl !Send for Client

impl !Sync for Client