dns_update/providers/
mod.rs

1/*
2 * Copyright Stalwart Labs LLC See the COPYING
3 * file at the top-level directory of this distribution.
4 *
5 * Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 * https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 * <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
8 * option. This file may not be copied, modified, or distributed
9 * except according to those terms.
10 */
11
12use crate::DnsRecord;
13
14pub mod cloudflare;
15pub mod digitalocean;
16pub mod desec;
17pub mod ovh;
18pub mod rfc2136;
19
20impl DnsRecord {
21    pub fn priority(&self) -> Option<u16> {
22        match self {
23            DnsRecord::MX { priority, .. } => Some(*priority),
24            DnsRecord::SRV { priority, .. } => Some(*priority),
25            _ => None,
26        }
27    }
28}