pub struct OptRecord<Octets> { /* private fields */ }
Expand description

An entire OPT record.

Because the EDNS specificiation uses parts of the header of the OPT record to convey some information, a special record type is necessary for OPT records. You can convert a normal record with Opt record data into an OptRecord via the from_record function.

The type derefs to the Opt type and provides all its functionality that way.

Implementations

Converts a regular record into an OPT record

Returns the UDP payload size.

Through this field a sender of a message can signal the maximum size of UDP payload the sender is able to handle when receiving messages. This value refers to the abilities of the sender’s DNS implementation, not such things as network MTUs. Which means that the largest UDP payload that can actually be sent back to the sender may be smaller.

Returns the extended rcode.

Some of the bits of the rcode are stored in the regular message header. Such a header needs to be passed to the method.

Returns the EDNS version of the OPT header.

Only EDNS version 0 is currently defined.

Returns the value of the DNSSEC OK (DO) bit.

By setting this bit, a resolver indicates that it is interested in also receiving the DNSSEC-related resource records necessary to validate an answer. The bit and the related procedures are defined in RFC 3225.

Returns a reference to the raw options.

Methods from Deref<Target = Opt<Octets>>

Returns an iterator over options of a given type.

The returned iterator will return only options represented by type D and quietly skip over all the others.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

The resulting type after dereferencing.

Dereferences the value.

Converts to this type from the input type.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.