avalanche-types 0.1.5

Avalanche primitive types in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use avalanche_types::proto::pb::helloworld::{greeter_client::GreeterClient, HelloRequest};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut client = GreeterClient::connect("http://[::1]:50051").await?;
    let request = tonic::Request::new(HelloRequest {
        name: "Avalanche Rustaceans!".into(),
    });
    let resp = client.say_hello(request).await?;

    println!("SUCCESSFUL response: {:?}", resp);

    Ok(())
}