summaryrefslogtreecommitdiffstats
path: root/examples/networkinspect.rs
blob: 143c6373425affe22258885e50db5f85e241bd5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use shiplift::Docker;
use std::env;

#[tokio::main]
async fn main() {
    let docker = Docker::new();
    let id = env::args()
        .nth(1)
        .expect("You need to specify a network id");

    match docker.networks().get(&id).inspect().await {
        Ok(network_info) => println!("{:#?}", network_info),
        Err(e) => eprintln!("Error: {}", e),
    }
}