[−][src]Trait trust_dns_proto::xfer::DnsRequestSender
Types that implement this are capable of sending a serialized DNS message on a stream
The underlying Stream implementation should yield Some(())
whenever it is ready to send a message,
NotReady, if it is not ready to send a message, and Err
or None
in the case that the stream is
done, and should be shutdown.
Required methods
pub fn send_message(&mut self, message: DnsRequest) -> DnsResponseFutureⓘNotable traits for DnsResponseFuture
impl Future for DnsResponseFuture type Output = Result<DnsResponse, ProtoError>;
[src]
Notable traits for DnsResponseFuture
impl Future for DnsResponseFuture type Output = Result<DnsResponse, ProtoError>;
Send a message, and return a future of the response
Return
A future which will resolve to a SerialMessage response
pub fn shutdown(&mut self)
[src]
Allows the upstream user to inform the underling stream that it should shutdown.
After this is called, the next time poll
is called on the stream it would be correct to return Poll::Ready(Ok(()))
. This is not required though, if there are say outstanding requests that are not yet complete, then it would be correct to first wait for those results.
pub fn is_shutdown(&self) -> bool
[src]
Returns true if the stream has been shutdown with shutdown
Implementors
impl<S, MF> DnsRequestSender for DnsMultiplexer<S, MF> where
S: DnsClientStream + Unpin + 'static,
MF: MessageFinalizer + Send + Sync + 'static,
[src]
S: DnsClientStream + Unpin + 'static,
MF: MessageFinalizer + Send + Sync + 'static,
pub fn send_message(&mut self, request: DnsRequest) -> DnsResponseFutureⓘNotable traits for DnsResponseFuture
impl Future for DnsResponseFuture type Output = Result<DnsResponse, ProtoError>;
[src]
Notable traits for DnsResponseFuture
impl Future for DnsResponseFuture type Output = Result<DnsResponse, ProtoError>;
pub fn shutdown(&mut self)
[src]
pub fn is_shutdown(&self) -> bool
[src]
impl<S: UdpSocket + Send + 'static, MF: MessageFinalizer> DnsRequestSender for UdpClientStream<S, MF>
[src]
pub fn send_message(&mut self, message: DnsRequest) -> DnsResponseFutureⓘNotable traits for DnsResponseFuture
impl Future for DnsResponseFuture type Output = Result<DnsResponse, ProtoError>;
[src]
Notable traits for DnsResponseFuture
impl Future for DnsResponseFuture type Output = Result<DnsResponse, ProtoError>;