Trait trust_dns::client::ClientConnection
[−]
[src]
pub trait ClientConnection: Sized { type MessageStream; fn new_stream(
&self,
handle: &Handle
) -> ClientResult<(Box<Future<Item = Self::MessageStream, Error = Error>>, Box<DnsStreamHandle<Error = ClientError>>)>; }
Trait for client connections
Associated Types
type MessageStream
The associated DNS Message stream type.
Required Methods
fn new_stream(
&self,
handle: &Handle
) -> ClientResult<(Box<Future<Item = Self::MessageStream, Error = Error>>, Box<DnsStreamHandle<Error = ClientError>>)>
&self,
handle: &Handle
) -> ClientResult<(Box<Future<Item = Self::MessageStream, Error = Error>>, Box<DnsStreamHandle<Error = ClientError>>)>
Return the inner Futures items
Consumes the connection and allows for future based operations afterward.
Implementors
impl ClientConnection for TcpClientConnection type MessageStream = TcpClientStream<TcpStream>;
impl ClientConnection for UdpClientConnection type MessageStream = UdpClientStream;