Struct trust_dns_proto::rr::RecordSet[][src]

pub struct RecordSet { /* fields omitted */ }
Expand description

Set of resource records associated to a name and type

Implementations

Creates a new Resource Record Set.

Arguments
  • name - The label for the RecordSet
  • record_type - RecordType of this RecordSet, all records in the RecordSet must be of the specified RecordType.
  • serial - current serial number of the SOA record, this is to be used for IXFR and signing for DNSSec after updates.
Return value

The newly created Resource Record Set TODO: make all cloned params pass by value

Creates a new Resource Record Set.

Arguments
  • name - The label for the RecordSet
  • record_type - RecordType of this RecordSet, all records in the RecordSet must be of the specified RecordType.
  • ttl - time-to-live for the RecordSet in seconds.
Return value

The newly created Resource Record Set TODO: make all cloned params pass by value

Return value

Label of the Resource Record Set

Return value

RecordType of the Resource Record Set

Sets the DNSClass to the specified value

This will traverse every record and associate with it the specified dns_class

Returns the DNSClass of the RecordSet

Sets the TTL, in seconds, to the specified value

This will traverse every record and associate with it the specified ttl

Returns the time-to-live for the record.

Return value

TTL, time-to-live, of the Resource Record Set, this is the maximum length of time that an RecordSet should be cached.

Returns a Vec of all records in the set, without any RRSIGs.

👎 Deprecated:

see records_without_rrsigs

Returns an iterator over the records in the set

Returns true if there are no records in this set

Returns the serial number at which the record was updated.

Returns a slice of all the Records signatures in the RecordSet

Inserts a Signature for the Record set

Many can be associated with the RecordSet. Once added, the RecordSet should not be changed

Arguments
  • rrsig - A signature which covers the RecordSet.

Useful for clearing all signatures when the RecordSet is updated, or keys are rotated.

creates a new Record as part of this RecordSet, adding the associated RData

this interface may be deprecated in the future.

creates a new Record as part of this RecordSet, adding the associated RData

Inserts a new Resource Record into the Set.

If the record is inserted, the ttl for the most recent record will be used for the ttl of the entire resource record set.

This abides by the following restrictions in RFC 2136, April 1997:

1.1.5. The following RR types cannot be appended to an RRset.  If the
 following comparison rules are met, then an attempt to add the new RR
 will result in the replacement of the previous RR:

SOA    compare only NAME, CLASS and TYPE -- it is not possible to
        have more than one SOA per zone, even if any of the data
        fields differ.

CNAME  compare only NAME, CLASS, and TYPE -- it is not possible
        to have more than one CNAME RR, even if their data fields
        differ.
Arguments
  • record - Record asserts that the name and record_type match the RecordSet.
  • serial - current serial number of the SOA record, this is to be used for IXFR and signing for DNSSec after updates. The serial will only be updated if the record was added.
Return value

True if the record was inserted.

TODO: make a default add without serial number for basic usage

Removes the Resource Record if it exists.

Arguments
  • record - Record asserts that the name and record_type match the RecordSet. Removes any record if the record data, RData, match.
  • serial - current serial number of the SOA record, this is to be used for IXFR and signing for DNSSec after updates. The serial will only be updated if the record was added.
Return value

True if a record was removed.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

👎 Deprecated:

use From/Into

Performs the conversion to a RecordSet

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

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.