[][src]Struct trust_dns_client::tcp::TcpClientStream

#[must_use = "futures do nothing unless polled"]pub struct TcpClientStream<S> { /* fields omitted */ }

Tcp client stream

Use with trust_dns_client::client::DnsMultiplexer impls

Implementations

impl<S> TcpClientStream<S> where
    S: 'static + Connect + Send
[src]

pub fn new<TE>(
    name_server: SocketAddr
) -> (TcpClientConnect<<S as Connect>::Transport>, Box<dyn DnsStreamHandle + 'static + Send, Global>) where
    TE: 'static + Time
[src]

Constructs a new TcpStream for a client to the specified SocketAddr.

Defaults to a 5 second timeout

Arguments

  • name_server - the IP and Port of the DNS server to connect to

pub fn with_timeout<TE>(
    name_server: SocketAddr,
    timeout: Duration
) -> (TcpClientConnect<<S as Connect>::Transport>, Box<dyn DnsStreamHandle + 'static + Send, Global>) where
    TE: 'static + Time
[src]

Constructs a new TcpStream for a client to the specified SocketAddr.

Arguments

  • name_server - the IP and Port of the DNS server to connect to
  • timeout - connection timeout

impl<S> TcpClientStream<S> where
    S: Send + AsyncRead + AsyncWrite
[src]

pub fn from_stream(tcp_stream: TcpStream<S>) -> TcpClientStream<S>[src]

Wraps the TcpStream in TcpClientStream

Trait Implementations

impl<S> Display for TcpClientStream<S> where
    S: Send + AsyncRead + AsyncWrite
[src]

impl<S> DnsClientStream for TcpClientStream<S> where
    S: Send + Unpin + AsyncRead + AsyncWrite
[src]

impl<S> Stream for TcpClientStream<S> where
    S: Send + Unpin + AsyncRead + AsyncWrite
[src]

type Item = Result<SerialMessage, ProtoError>

Values yielded by the stream.

Auto Trait Implementations

impl<S> !RefUnwindSafe for TcpClientStream<S>

impl<S> Send for TcpClientStream<S> where
    S: Send

impl<S> Sync for TcpClientStream<S> where
    S: Sync

impl<S> Unpin for TcpClientStream<S> where
    S: Unpin

impl<S> !UnwindSafe for TcpClientStream<S>

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> StreamExt for T where
    T: Stream + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<S> TryStreamExt for S where
    S: TryStream + ?Sized
[src]

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