Struct DnsExchange
pub struct DnsExchange<P> { /* private fields */ }Expand description
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.
Implementations§
§impl<P> DnsExchange<P>where
P: RuntimeProvider,
impl<P> DnsExchange<P>where
P: RuntimeProvider,
pub fn from_stream<S>(
stream: S,
) -> (DnsExchange<P>, DnsExchangeBackground<S, <P as RuntimeProvider>::Timer>)where
S: DnsRequestSender,
pub fn from_stream<S>(
stream: S,
) -> (DnsExchange<P>, DnsExchangeBackground<S, <P as RuntimeProvider>::Timer>)where
S: DnsRequestSender,
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
Trait Implementations§
§impl<P> Clone for DnsExchange<P>where
P: Clone,
impl<P> Clone for DnsExchange<P>where
P: Clone,
§fn clone(&self) -> DnsExchange<P>
fn clone(&self) -> DnsExchange<P>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl<P> DnsHandle for DnsExchange<P>where
P: RuntimeProvider,
impl<P> DnsHandle for DnsExchange<P>where
P: RuntimeProvider,
§type Response = DnsExchangeSend<P>
type Response = DnsExchangeSend<P>
The associated response from the response stream, this should resolve to the Response messages
§fn send(&self, request: DnsRequest) -> <DnsExchange<P> as DnsHandle>::Response
fn send(&self, request: DnsRequest) -> <DnsExchange<P> as DnsHandle>::Response
Send a message via the channel in the client Read more
§fn is_verifying_dnssec(&self) -> bool
fn is_verifying_dnssec(&self) -> bool
Only returns true if and only if this DNS handle is validating DNSSEC. Read more
§fn is_using_edns(&self) -> bool
fn is_using_edns(&self) -> bool
Allow for disabling EDNS
Auto Trait Implementations§
impl<P> Freeze for DnsExchange<P>
impl<P> !RefUnwindSafe for DnsExchange<P>
impl<P> Send for DnsExchange<P>where
P: Send,
impl<P> Sync for DnsExchange<P>where
P: Sync,
impl<P> Unpin for DnsExchange<P>where
P: Unpin,
impl<P> UnsafeUnpin for DnsExchange<P>
impl<P> !UnwindSafe for DnsExchange<P>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> ClientHandle for Twhere
T: DnsHandle,
impl<T> ClientHandle for Twhere
T: DnsHandle,
§fn query(
&mut self,
name: Name,
query_class: DNSClass,
query_type: RecordType,
) -> ClientResponse<Self::Response> ⓘ
fn query( &mut self, name: Name, query_class: DNSClass, query_type: RecordType, ) -> ClientResponse<Self::Response> ⓘ
A classic DNS query Read more
§fn notify<R>(
&mut self,
name: Name,
query_class: DNSClass,
query_type: RecordType,
rrset: Option<R>,
) -> ClientResponse<Self::Response> ⓘ
fn notify<R>( &mut self, name: Name, query_class: DNSClass, query_type: RecordType, rrset: Option<R>, ) -> ClientResponse<Self::Response> ⓘ
Sends a NOTIFY message to the remote system Read more
§fn create<R>(
&mut self,
rrset: R,
zone_origin: Name,
) -> ClientResponse<Self::Response> ⓘ
fn create<R>( &mut self, rrset: R, zone_origin: Name, ) -> ClientResponse<Self::Response> ⓘ
Sends a record to create on the server, this will fail if the record exists (atomicity
depends on the server) Read more
§fn append<R>(
&mut self,
rrset: R,
zone_origin: Name,
must_exist: bool,
) -> ClientResponse<Self::Response> ⓘ
fn append<R>( &mut self, rrset: R, zone_origin: Name, must_exist: bool, ) -> ClientResponse<Self::Response> ⓘ
Appends a record to an existing rrset, optionally require the rrset to exist (atomicity
depends on the server) Read more
§fn compare_and_swap<C, N>(
&mut self,
current: C,
new: N,
zone_origin: Name,
) -> ClientResponse<Self::Response> ⓘ
fn compare_and_swap<C, N>( &mut self, current: C, new: N, zone_origin: Name, ) -> ClientResponse<Self::Response> ⓘ
Compares and if it matches, swaps it for the new value (atomicity depends on the server) Read more
§fn delete_by_rdata<R>(
&mut self,
rrset: R,
zone_origin: Name,
) -> ClientResponse<Self::Response> ⓘ
fn delete_by_rdata<R>( &mut self, rrset: R, zone_origin: Name, ) -> ClientResponse<Self::Response> ⓘ
Deletes a record (by rdata) from an rrset, optionally require the rrset to exist. Read more
§fn delete_rrset(
&mut self,
record: Record,
zone_origin: Name,
) -> ClientResponse<Self::Response> ⓘ
fn delete_rrset( &mut self, record: Record, zone_origin: Name, ) -> ClientResponse<Self::Response> ⓘ
Deletes an entire rrset, optionally require the rrset to exist. Read more
§fn delete_all(
&mut self,
name_of_records: Name,
zone_origin: Name,
dns_class: DNSClass,
) -> ClientResponse<Self::Response> ⓘ
fn delete_all( &mut self, name_of_records: Name, zone_origin: Name, dns_class: DNSClass, ) -> ClientResponse<Self::Response> ⓘ
Deletes all records at the specified name Read more
§fn zone_transfer(
&mut self,
zone_origin: Name,
last_soa: Option<SOA>,
) -> ClientStreamXfr<Self::Response>
fn zone_transfer( &mut self, zone_origin: Name, last_soa: Option<SOA>, ) -> ClientStreamXfr<Self::Response>
Download all records from a zone, or all records modified since given SOA was observed.
The request will either be a AXFR Query (ask for full zone transfer) if a SOA was not
provided, or a IXFR Query (incremental zone transfer) if a SOA was provided. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Create a new
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more