#[non_exhaustive]pub struct RequestInfo<'a> {
pub src: SocketAddr,
pub protocol: Protocol,
pub metadata: &'a Metadata,
pub query: &'a LowerQuery,
}Expand description
A narrow view of the Request, specifically a verified single query for the request
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.src: SocketAddrThe source address from which the request came
protocol: ProtocolThe protocol used for the request
metadata: &'a MetadataThe header from the original request
query: &'a LowerQueryThe query from the request
Implementations§
Source§impl<'a> RequestInfo<'a>
impl<'a> RequestInfo<'a>
Sourcepub fn new(
src: SocketAddr,
protocol: Protocol,
metadata: &'a Metadata,
query: &'a LowerQuery,
) -> Self
pub fn new( src: SocketAddr, protocol: Protocol, metadata: &'a Metadata, query: &'a LowerQuery, ) -> Self
Construct a new RequestInfo
§Arguments
src- The source address from which the request cameprotocol- The protocol used for the requestheader- The header from the original requestquery- The query from the request, LowerQuery is intended to reduce complexity for lookups in zone handlers
Trait Implementations§
Source§impl<'a> Clone for RequestInfo<'a>
impl<'a> Clone for RequestInfo<'a>
Source§fn clone(&self) -> RequestInfo<'a>
fn clone(&self) -> RequestInfo<'a>
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 moreAuto Trait Implementations§
impl<'a> Freeze for RequestInfo<'a>
impl<'a> RefUnwindSafe for RequestInfo<'a>
impl<'a> Send for RequestInfo<'a>
impl<'a> Sync for RequestInfo<'a>
impl<'a> Unpin for RequestInfo<'a>
impl<'a> UnsafeUnpin for RequestInfo<'a>
impl<'a> UnwindSafe for RequestInfo<'a>
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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