Trait trust_dns::client::ClientConnection
[−]
[src]
pub trait ClientConnection: Sized { type MessageStream: Stream<Item = Vec<u8>, Error = Error> + Send + 'static; fn new_stream(
&self
) -> ClientResult<(Box<Future<Item = Self::MessageStream, Error = Error> + Send>, Box<DnsStreamHandle<Error = ClientError> + Send>)>; }
Trait for client connections
Associated Types
type MessageStream: Stream<Item = Vec<u8>, Error = Error> + Send + 'static
The associated DNS Message stream type.
Required Methods
fn new_stream(
&self
) -> ClientResult<(Box<Future<Item = Self::MessageStream, Error = Error> + Send>, Box<DnsStreamHandle<Error = ClientError> + Send>)>
&self
) -> ClientResult<(Box<Future<Item = Self::MessageStream, Error = Error> + Send>, Box<DnsStreamHandle<Error = ClientError> + Send>)>
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;