[−][src]Struct trust_dns_proto::xfer::DnsExchange
This is a generic Exchange implemented over multiplexed DNS connection providers.
The underlying DnsRequestSender
is expected to multiplex any I/O connections. DnsExchange assumes that the underlying stream is responsible for this.
Methods
impl<R> DnsExchange<R> where
R: Future<Output = Result<DnsResponse, ProtoError>> + 'static + Send + Unpin,
[src]
R: Future<Output = Result<DnsResponse, ProtoError>> + 'static + Send + Unpin,
pub fn from_stream<S, TE>(stream: S) -> (Self, DnsExchangeBackground<S, R, TE>) where
S: DnsRequestSender<DnsResponseFuture = R> + 'static + Send + Unpin,
[src]
S: DnsRequestSender<DnsResponseFuture = R> + 'static + Send + Unpin,
Initializes a TcpStream with an existing tcp::TcpStream.
This is intended for use with a TcpListener and Incoming.
Arguments
stream
- the established IO stream for communication
pub fn from_stream_with_receiver<S, TE>(
stream: S,
receiver: UnboundedReceiver<OneshotDnsRequest<R>>,
sender: DnsRequestStreamHandle<R>
) -> (Self, DnsExchangeBackground<S, R, TE>) where
S: DnsRequestSender<DnsResponseFuture = R> + 'static + Send + Unpin,
[src]
stream: S,
receiver: UnboundedReceiver<OneshotDnsRequest<R>>,
sender: DnsRequestStreamHandle<R>
) -> (Self, DnsExchangeBackground<S, R, TE>) where
S: DnsRequestSender<DnsResponseFuture = R> + 'static + Send + Unpin,
Wraps a stream where a sender and receiver have already been established
pub fn connect<F, S, TE>(connect_future: F) -> DnsExchangeConnect<F, S, R, TE> where
F: Future<Output = Result<S, ProtoError>> + 'static + Send + Unpin,
S: DnsRequestSender<DnsResponseFuture = R> + 'static + Send + Unpin,
TE: Time + Unpin,
[src]
F: Future<Output = Result<S, ProtoError>> + 'static + Send + Unpin,
S: DnsRequestSender<DnsResponseFuture = R> + 'static + Send + Unpin,
TE: Time + Unpin,
Returns a future, which itself wraps a future which is awaiting connection.
The connect_future should be lazy.
Trait Implementations
impl<R> Clone for DnsExchange<R> where
R: Future<Output = Result<DnsResponse, ProtoError>> + 'static + Send + Unpin,
[src]
R: Future<Output = Result<DnsResponse, ProtoError>> + 'static + Send + Unpin,
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<Resp> DnsHandle for DnsExchange<Resp> where
Resp: Future<Output = Result<DnsResponse, ProtoError>> + 'static + Send + Unpin,
[src]
Resp: Future<Output = Result<DnsResponse, ProtoError>> + 'static + Send + Unpin,
type Response = DnsExchangeSend<Resp>
The associated response from the response future, this should resolve to the Response message
fn send<R: Into<DnsRequest> + Unpin + Send + 'static>(
&mut self,
request: R
) -> Self::Response
[src]
&mut self,
request: R
) -> Self::Response
fn is_verifying_dnssec(&self) -> bool
[src]
fn lookup(&mut self, query: Query, options: DnsRequestOptions) -> Self::Response
[src]
Auto Trait Implementations
impl<R> !RefUnwindSafe for DnsExchange<R>
impl<R> Send for DnsExchange<R>
impl<R> Sync for DnsExchange<R>
impl<R> Unpin for DnsExchange<R>
impl<R> !UnwindSafe for DnsExchange<R>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,