lisk_api_rust_client/connection/
mod.rs1mod manager;
2pub use self::manager::Manager;
3
4use api::Api;
5use http::client::Client;
6use std::ops::Deref;
7
8pub struct Connection {
9 pub client: Client,
10 api: Api,
11}
12
13impl Connection {
14 pub fn new(host: &str) -> Connection {
15 let client = Client::new(host);
16 let api = Api::new_with_client(&client);
17 Connection { client, api }
18 }
19}
20
21impl Deref for Connection {
22 type Target = Api;
23
24 fn deref(&self) -> &Api {
25 &self.api
26 }
27}