apt-cmd 0.3.0

Async library for interacting with apt commands
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use futures::stream::StreamExt;

fn main() -> anyhow::Result<()> {
    futures::executor::block_on(async move {
        let (_child, policies) = apt_cmd::AptCache::new()
            .policy(&["firefox", "gnome-shell"])
            .await?;

        futures_util::pin_mut!(policies);

        while let Some(policy) = policies.next().await {
            println!("policy: {:#?}", policy);
        }

        Ok(())
    })
}