[−][src]Struct dnsie::DnsRequest
DnsRequest is parsed(or manually constructed) dns request which may be serialized and sent to DNS server.
Right now the only serialization destination format is DNS binary but it may be serialized to some JSON specific for DNS resolver platform.
Note
It does not contain fields which are.
Fields
id: u16
query_name: Cow<'a, str>
query_name is domain name represented as string
query_kind: AnyQueryKind
ty: AnyDnsType
cls: AnyDnsClass
Methods
impl<'a> DnsRequest<'a>
[src]
pub fn make_simple(ty: AnyDnsType, domain: &'a str) -> Self
[src]
make_simple constructs request with reasonable defaults to resolve given record type for given domain
impl<'a> DnsRequest<'a>
[src]
pub fn to_dns_binary(&self, w: &mut impl Write) -> Result<(), Error>
[src]
to_dns_binary serializes given request into DNS binary format.
Error
It returns error if writer fails.
If some label can't be encoded for some reason appropriate std::io::Error
is returned.
Otherwise it always succeeds and returns Ok(())
.
Note
Checks for name correctness aren't necessarily strict and thus this function may create invalid(according to RFC) dns request. This may happen for instance when there are too many labels.
Auto Trait Implementations
impl<'a> RefUnwindSafe for DnsRequest<'a>
impl<'a> Send for DnsRequest<'a>
impl<'a> Sync for DnsRequest<'a>
impl<'a> Unpin for DnsRequest<'a>
impl<'a> UnwindSafe for DnsRequest<'a>
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, 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>,