pub struct CreateOrEditDnsRecord<'a> {
pub subdomain: Option<&'a str>,
pub record_type: DnsRecordType,
pub content: Cow<'a, str>,
pub ttl: Option<u64>,
pub prio: u32,
}Expand description
create, or edit with a DNS record with a domain/id pair
Fields§
§subdomain: Option<&'a str>The subdomain for the record being created, not including the domain itself. Leave blank to create a record on the root domain. Use * to create a wildcard record.
record_type: DnsRecordTypeThe type of record that should be created
content: Cow<'a, str>The answer content for the record.
ttl: Option<u64>The time to live in seconds for the record. The minimum and the default is 600 seconds.
prio: u32The priority of the record for those that support it.
Implementations§
Source§impl<'a> CreateOrEditDnsRecord<'a>
impl<'a> CreateOrEditDnsRecord<'a>
Sourcepub fn new(
subdomain: Option<&'a str>,
record_type: DnsRecordType,
content: impl Into<Cow<'a, str>>,
) -> Self
pub fn new( subdomain: Option<&'a str>, record_type: DnsRecordType, content: impl Into<Cow<'a, str>>, ) -> Self
Makes a new CreateOrEditDnsRecord for the given subdomain, with the given record type and content.
Sourcepub fn A(subdomain: Option<&'a str>, ip: Ipv4Addr) -> Self
pub fn A(subdomain: Option<&'a str>, ip: Ipv4Addr) -> Self
Makes a new CreateOrEditDnsRecord for creating an A-record for the given subdomain, with the given IP address as a response.
Sourcepub fn AAAA(subdomain: Option<&'a str>, ip: Ipv6Addr) -> Self
pub fn AAAA(subdomain: Option<&'a str>, ip: Ipv6Addr) -> Self
Makes a new CreateOrEditDnsRecord for creating an AAAA-record for the given subdomain, with the given IP address as a response.
Sourcepub fn A_or_AAAA(subdomain: Option<&'a str>, ip: IpAddr) -> Self
pub fn A_or_AAAA(subdomain: Option<&'a str>, ip: IpAddr) -> Self
Makes a new CreateOrEditDnsRecord for creating an A- or AAAA-record (depending on the value of the ip address) for the given subdomain, with the given IP address as a response.
Sourcepub fn with_ttl(self, ttl: Option<Duration>) -> Self
pub fn with_ttl(self, ttl: Option<Duration>) -> Self
Set the time-to-live for this record. The minimum and the default is 600 seconds. Any value less than 600 seconds will be rounded up.
Sourcepub fn with_priority(self, prio: u32) -> Self
pub fn with_priority(self, prio: u32) -> Self
Set the priority for this record, for records that support it.
Trait Implementations§
Source§impl<'a> Debug for CreateOrEditDnsRecord<'a>
impl<'a> Debug for CreateOrEditDnsRecord<'a>
Source§impl<'a> PartialEq for CreateOrEditDnsRecord<'a>
impl<'a> PartialEq for CreateOrEditDnsRecord<'a>
Source§impl<'a> Serialize for CreateOrEditDnsRecord<'a>
impl<'a> Serialize for CreateOrEditDnsRecord<'a>
impl<'a> Eq for CreateOrEditDnsRecord<'a>
impl<'a> StructuralPartialEq for CreateOrEditDnsRecord<'a>
Auto Trait Implementations§
impl<'a> Freeze for CreateOrEditDnsRecord<'a>
impl<'a> RefUnwindSafe for CreateOrEditDnsRecord<'a>
impl<'a> Send for CreateOrEditDnsRecord<'a>
impl<'a> Sync for CreateOrEditDnsRecord<'a>
impl<'a> Unpin for CreateOrEditDnsRecord<'a>
impl<'a> UnwindSafe for CreateOrEditDnsRecord<'a>
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
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.