Struct bgpq3::Bgpq3 [−][src]
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]
&self,
query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv4Network>>
Queries a list of IPv4 networks.
pub fn query_v6(
&self,
query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv6Network>>
[src]
&self,
query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv6Network>>
Queries a list of IPv6 networks.
pub async fn tokio_query_v4(
&self,
query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv4Network>>
[src]
&self,
query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv4Network>>
Queries a list of IPv4 networks using tokio.
pub async fn tokio_query_v6(
&self,
query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv6Network>>
[src]
&self,
query: impl Into<Bgpq3Query>
) -> Bgpq3Result<Vec<Ipv6Network>>
Queries a list of IPv6 networks using tokio.
Trait Implementations
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,