Struct bgpq3::Bgpq3[][src]

pub struct Bgpq3 { /* fields omitted */ }

A wrapper around the bgpq3 or bgpq4 binary.

The default wrapper can be crated with Bgpq3::new. A custom wrapper can be build using the Bgpq3Settings builder.

The binaries have to be located in the $PATH environment variable for the default configuration.

Example

Default wrapper using bgpq3:

use bgpq3::Bgpq3;

let bgpq3 = Bgpq3::new();

Custom wrapper using the recommended bgpq4 fork:

use bgpq3::{Bgpq3, Version};

let bgpq4 = Bgpq3::builder().version(Version::Bgpq4).build();

Implementations

impl Bgpq3[src]

pub fn new() -> Bgpq3[src]

Creates a new Bgpq3 wrapper with the default settings.

pub fn bgpq3() -> Bgpq3[src]

Creates a new wrapper with bgpq3 as a backend.

pub fn bgpq4() -> Bgpq3[src]

Creates a new wrapper with bgpq4 as a backend.

pub fn builder() -> Bgpq3Settings[src]

Creates a new Bgpq3 builder Bgpq3Settings.

pub fn with_settings(settings: &Bgpq3Settings) -> Bgpq3[src]

Creates a new Bgpq3 from a builder..

pub fn query_v4(
    &self,
    query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv4Network>>
[src]

Queries a list of IPv4 networks.

pub fn query_v6(
    &self,
    query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv6Network>>
[src]

Queries a list of IPv6 networks.

pub async fn tokio_query_v4(
    &self,
    query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv4Network>>
[src]

Queries a list of IPv4 networks using tokio.

pub async fn tokio_query_v6(
    &self,
    query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv6Network>>
[src]

Queries a list of IPv6 networks using tokio.

Trait Implementations

impl Clone for Bgpq3[src]

impl Default for Bgpq3[src]

Auto Trait Implementations

impl RefUnwindSafe for Bgpq3

impl Send for Bgpq3

impl Sync for Bgpq3

impl Unpin for Bgpq3

impl UnwindSafe for Bgpq3

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.