pub struct QDnsQuery {
pub elapsed: Option<Duration>,
pub server: String,
pub aa: bool,
pub authoratives: Vec<DnsResponsePayload>,
pub resp: Vec<DnsResponsePayload>,
pub status: QDnsQueryRec,
}
Expand description
A structure which describes the query properties and contains the results.
Fields§
§elapsed: Option<Duration>
A realtime time elapsed for query
server: String
Server which performed the response and port number
aa: bool
Flags
Authoratives section
resp: Vec<DnsResponsePayload>
Responses
status: QDnsQueryRec
Status
Implementations§
Source§impl QDnsQuery
impl QDnsQuery
pub fn get_elapsed_time(&self) -> Option<&Duration>
pub fn get_server(&self) -> &String
Returns the authorative server data if any
Sourcepub fn get_responses(&self) -> &[DnsResponsePayload]
pub fn get_responses(&self) -> &[DnsResponsePayload]
Returns the responses if any
Sourcepub fn move_responses(self) -> Vec<DnsResponsePayload>
pub fn move_responses(self) -> Vec<DnsResponsePayload>
Moves the responses from structure
pub fn get_status(&self) -> QDnsQueryRec
pub fn should_check_next_ns(&self) -> bool
Source§impl QDnsQuery
impl QDnsQuery
Sourcepub fn from_local(
req_pl: Vec<DnsResponsePayload>,
now: Option<&Instant>,
) -> QDnsQuery
pub fn from_local( req_pl: Vec<DnsResponsePayload>, now: Option<&Instant>, ) -> QDnsQuery
Constructs instance like it is from ‘local’ source but not from DNS server.
Sourcepub fn from_response(
server: &SocketAddr,
ans: DnsRequestAnswer,
now: Option<&Instant>,
) -> CDnsResult<Self>
pub fn from_response( server: &SocketAddr, ans: DnsRequestAnswer, now: Option<&Instant>, ) -> CDnsResult<Self>
Constructs an instance from the remote response.
Trait Implementations§
Source§impl IntoIterator for QDnsQuery
impl IntoIterator for QDnsQuery
Auto Trait Implementations§
impl Freeze for QDnsQuery
impl RefUnwindSafe for QDnsQuery
impl Send for QDnsQuery
impl Sync for QDnsQuery
impl Unpin for QDnsQuery
impl UnwindSafe for QDnsQuery
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