pub struct DnsConfig<T> { /* private fields */ }Expand description
Represents the configuration for a DNS transport capability of libp2p.
This struct implements the Transport trait and holds an underlying transport. Any call to
dial with a multiaddr that contains /dns/, /dns4/, or /dns6/ will be first be resolved,
then passed to the underlying transport.
Listening is unaffected.
Implementations§
Trait Implementations§
Source§impl<T> Transport for DnsConfig<T>
impl<T> Transport for DnsConfig<T>
Source§type Output = <T as Transport>::Output
type Output = <T as Transport>::Output
The result of a connection setup process, including protocol upgrades. Read more
Source§fn listen_on(
&mut self,
addr: Multiaddr,
) -> Result<IListener<Self::Output>, TransportError>
fn listen_on( &mut self, addr: Multiaddr, ) -> Result<IListener<Self::Output>, TransportError>
Source§fn dial<'life0, 'async_trait>(
&'life0 mut self,
addr: Multiaddr,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dial<'life0, 'async_trait>(
&'life0 mut self,
addr: Multiaddr,
) -> Pin<Box<dyn Future<Output = Result<Self::Output, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn box_clone(&self) -> ITransport<Self::Output>
fn box_clone(&self) -> ITransport<Self::Output>
Clones the transport and returns the trait object.
Source§fn timeout(self, timeout: Duration) -> TransportTimeout<Self>where
Self: Sized,
fn timeout(self, timeout: Duration) -> TransportTimeout<Self>where
Self: Sized,
Adds a timeout to the connection setup (including upgrades) for all
inbound and outbound connections established through the transport.
Source§fn outbound_timeout(self, timeout: Duration) -> TransportTimeout<Self>where
Self: Sized,
fn outbound_timeout(self, timeout: Duration) -> TransportTimeout<Self>where
Self: Sized,
Adds a timeout to the connection setup (including upgrades) for all outbound
connections established through the transport.
Source§fn inbound_timeout(self, timeout: Duration) -> TransportTimeout<Self>where
Self: Sized,
fn inbound_timeout(self, timeout: Duration) -> TransportTimeout<Self>where
Self: Sized,
Adds a timeout to the connection setup (including upgrades) for all inbound
connections established through the transport.
Auto Trait Implementations§
impl<T> Freeze for DnsConfig<T>where
T: Freeze,
impl<T> RefUnwindSafe for DnsConfig<T>where
T: RefUnwindSafe,
impl<T> Send for DnsConfig<T>where
T: Send,
impl<T> Sync for DnsConfig<T>where
T: Sync,
impl<T> Unpin for DnsConfig<T>where
T: Unpin,
impl<T> UnwindSafe for DnsConfig<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more