Struct libp2p_dns::GenDnsConfig[][src]

pub struct GenDnsConfig<T, C, P> where
    C: DnsHandle<Error = ResolveError>,
    P: ConnectionProvider<Conn = C>, 
{ /* fields omitted */ }

A Transport wrapper for performing DNS lookups when dialing Multiaddresses.

Implementations

impl<T> GenDnsConfig<T, GenericConnection, GenericConnectionProvider<AsyncStdRuntime>>[src]

pub async fn system(inner: T) -> Result<DnsConfig<T>, Error>[src]

Creates a new DnsConfig from the OS’s DNS configuration and defaults.

pub async fn custom(
    inner: T,
    cfg: ResolverConfig,
    opts: ResolverOpts
) -> Result<DnsConfig<T>, Error>
[src]

Creates a DnsConfig with a custom resolver configuration and options.

Trait Implementations

impl<T: Clone, C: Clone, P: Clone> Clone for GenDnsConfig<T, C, P> where
    C: DnsHandle<Error = ResolveError>,
    P: ConnectionProvider<Conn = C>, 
[src]

impl<T, C, P> Debug for GenDnsConfig<T, C, P> where
    C: DnsHandle<Error = ResolveError>,
    P: ConnectionProvider<Conn = C>,
    T: Debug
[src]

impl<T, C, P> Transport for GenDnsConfig<T, C, P> where
    T: Transport + Clone + Send + 'static,
    T::Error: Send,
    T::Dial: Send,
    C: DnsHandle<Error = ResolveError>,
    P: ConnectionProvider<Conn = C>, 
[src]

type Output = T::Output

The result of a connection setup process, including protocol upgrades. Read more

type Error = DnsErr<T::Error>

An error that occurred during connection setup.

type Listener = MapErr<MapOk<T::Listener, fn(_: ListenerEvent<T::ListenerUpgrade, T::Error>) -> ListenerEvent<Self::ListenerUpgrade, Self::Error>>, fn(_: T::Error) -> Self::Error>

A stream of Outputs for inbound connections. Read more

type ListenerUpgrade = MapErr<T::ListenerUpgrade, fn(_: T::Error) -> Self::Error>

A pending Output for an inbound connection, obtained from the Listener stream. Read more

type Dial = Either<MapErr<T::Dial, fn(_: T::Error) -> Self::Error>, BoxFuture<'static, Result<Self::Output, Self::Error>>>

A pending Output for an outbound connection, obtained from dialing. Read more

Auto Trait Implementations

impl<T, C, P> !RefUnwindSafe for GenDnsConfig<T, C, P>

impl<T, C, P> Send for GenDnsConfig<T, C, P> where
    T: Send

impl<T, C, P> Sync for GenDnsConfig<T, C, P> where
    T: Sync

impl<T, C, P> Unpin for GenDnsConfig<T, C, P> where
    T: Unpin

impl<T, C, P> !UnwindSafe for GenDnsConfig<T, C, P>

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> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,