Struct barreleye_client::Info
source · pub struct Info { /* private fields */ }
Implementations§
source§impl Info
impl Info
sourcepub async fn get(client: &Barreleye, address: &str) -> Response<Self>
pub async fn get(client: &Barreleye, address: &str) -> Response<Self>
Examples found in repository?
examples/get_address_info.rs (line 11)
4 5 6 7 8 9 10 11 12 13 14 15 16
async fn main() {
// Define the client
let url = "http://localhost:22775";
let api_key = None;
let client = Barreleye::new(url, api_key);
// Get info about the address
match Info::get(&client, "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa").await {
Ok(info) => println!("{:?}", info),
Err(Error::Unavailable) => println!("Is Barreleye server running?"),
Err(e) => println!("Error: {e}"),
}
}
Trait Implementations§
source§impl<'de> Deserialize<'de> for Info
impl<'de> Deserialize<'de> for Info
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more