Trait trust_dns::client::ClientConnection [−][src]
pub trait ClientConnection: 'static + Sized + Send { type Sender: DnsRequestSender<DnsResponseFuture = Self::Response>; type Response: Future<Item = DnsResponse, Error = ProtoError> + 'static + Send; type SenderFuture: Future<Item = Self::Sender, Error = ProtoError> + 'static + Send; fn new_stream(
&self,
signer: Option<Arc<Signer>>
) -> (DnsExchangeConnect<Self::SenderFuture, Self::Sender, Self::Response>, DnsRequestStreamHandle<Self::Response>); }
Trait for client connections
Associated Types
type Sender: DnsRequestSender<DnsResponseFuture = Self::Response>
The associated DNS RequestSender type.
type Response: Future<Item = DnsResponse, Error = ProtoError> + 'static + Send
Response type of the RequestSender
type SenderFuture: Future<Item = Self::Sender, Error = ProtoError> + 'static + Send
A future that resolves to the RequestSender
Required Methods
fn new_stream(
&self,
signer: Option<Arc<Signer>>
) -> (DnsExchangeConnect<Self::SenderFuture, Self::Sender, Self::Response>, DnsRequestStreamHandle<Self::Response>)
&self,
signer: Option<Arc<Signer>>
) -> (DnsExchangeConnect<Self::SenderFuture, Self::Sender, Self::Response>, DnsRequestStreamHandle<Self::Response>)
Construct a new stream for use in the Client
Implementors
impl ClientConnection for TcpClientConnection type Sender = DnsMultiplexer<TcpClientStream<TcpStream>, Signer>; type Response = <Self::Sender as DnsRequestSender>::DnsResponseFuture; type SenderFuture = DnsMultiplexerConnect<TcpClientStream<TcpStream>, Signer>;
impl ClientConnection for UdpClientConnection type Sender = DnsMultiplexer<UdpClientStream, Signer>; type Response = <Self::Sender as DnsRequestSender>::DnsResponseFuture; type SenderFuture = DnsMultiplexerConnect<UdpClientStream, Signer>;