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

A type for parsing any type of record data.

This type accepts any record type and stores the plain, unparsed record data as an octets sequence.

Because some record types allow compressed domain names in their record data, this type cannot be used safely with these record types. For these record types, the structure of the content needs to be known.

RFC 3597 limits the types for which compressed names are allowed in the record data to those defined in RFC 1035 itself. Specific types for all these record types exist in domain::rdata::rfc1035.

Ultimately, you should only use this type for record types for which there is no implementation available in this crate. The two types AllRecordData and MasterRecordData provide a convenient way to always use the correct record data type.

Implementations

Creates generic record data from a bytes value contain the data.

Returns the record type this data is for.

Returns a reference to the record data.

Scans the record data.

This isn’t implemented via Scan, because we need the record type.

Trait Implementations

Returns the canonical ordering between self and other.

Returns whether self is canonically less than other.

Returns whether self is canonically less than or equal to other.

Returns whether self is canonically greater than other.

Returns whether self is canonically greater than or equal to other.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Appends the concrete representation of the value to the target. Read more

Appends the canonical representation of the value to the target. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Performs the conversion.

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

Parses the record data. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Returns the record type associated with this record data instance. Read more

Serialize this value into the given Serde serializer. Read more

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

Converts the given value to a String. 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.