Rust bgpq3
==========

[<img alt="github" src="https://img.shields.io/badge/github-rappet/rust__bgpq3-8da0cb?style=for-the-badge&labelColor=555555&logo=github" height="20">](https://github.com/rappet/rust_bgpq3)
[<img alt="crates.io" src="https://img.shields.io/crates/v/bgpq3.svg?style=for-the-badge&color=fc8d62&logo=rust" height="20">](https://crates.io/crates/bgpq3)
[<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-bgpq3-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64, " height="20">](https://docs.rs/bgpq3)

This library provides a thing wrapper around the [`bgpq3`]/[`bgpq4`] binary.

## Example

bgpq3 AS-Set

```rust
extern crate bgpq3;

pub fn main() {
    let networks = bgpq3::Bgpq3::new().query_v6("AS-RAPPET").unwrap();
    println!("{:?}", networks);
}
```

bgpq3 ASN

```rust
extern crate bgpq3;

pub fn main() {
    let networks = bgpq3::Bgpq3::new().query_v6(207968).unwrap();
    println!("{:?}", networks);
}
```

bgpq4

```rust
extern crate bgpq3;
use bgpq3::Bgpq3;

pub fn main() {
    let networks = Bgpq3::bgpq4().query_v6("AS-RAPPET").unwrap();
    println!("{:?}", networks);
}
```

## Feature flags

- `tokio` for async process invocation.

[`bgpq3`]: https://github.com/snar/bgpq3
[`bgpq4`]: https://github.com/bgp/bgpq4