Struct trust_dns_server::server::RequestInfo
source · #[non_exhaustive]pub struct RequestInfo<'a> {
pub src: SocketAddr,
pub protocol: Protocol,
pub header: &'a Header,
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: SocketAddr
The source address from which the request came
protocol: Protocol
The protocol used for the request
header: &'a Header
The header from the original request
query: &'a LowerQuery
The query from the request
Implementations§
source§impl<'a> RequestInfo<'a>
impl<'a> RequestInfo<'a>
sourcepub fn new(
src: SocketAddr,
protocol: Protocol,
header: &'a Header,
query: &'a LowerQuery
) -> Self
pub fn new( src: SocketAddr, protocol: Protocol, header: &'a Header, 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 authorities
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 copy 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> RefUnwindSafe for RequestInfo<'a>
impl<'a> Send for RequestInfo<'a>
impl<'a> Sync for RequestInfo<'a>
impl<'a> Unpin 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