pub struct ZoneConfig {
pub ttl: u32,
pub soa: SoaRecord,
pub name_servers: Vec<String>,
pub name_server_ips: HashMap<String, String>,
pub records: Vec<DnsRecord>,
pub also_notify: Option<Vec<String>>,
pub allow_transfer: Option<Vec<String>>,
pub primaries: Option<Vec<String>>,
pub dnssec_policy: Option<String>,
pub inline_signing: Option<bool>,
}Expand description
Structured zone configuration
Fields§
§ttl: u32Default TTL for the zone (e.g., 3600)
soa: SoaRecordSOA record
name_servers: Vec<String>Name servers for the zone
name_server_ips: HashMap<String, String>A records for nameservers (glue records) Maps nameserver hostname to IP address (e.g., “ns1.example.com.” -> “192.0.2.1”)
records: Vec<DnsRecord>DNS records in the zone
also_notify: Option<Vec<String>>IP addresses of secondary servers to notify when zone changes (BIND9 also-notify) Example: [“10.244.2.101”, “10.244.2.102”]
allow_transfer: Option<Vec<String>>IP addresses allowed to transfer the zone (BIND9 allow-transfer) Example: [“10.244.2.101”, “10.244.2.102”]
primaries: Option<Vec<String>>IP addresses of primary servers for secondary zones (BIND9 primaries/masters) Example: [“192.0.2.1”, “192.0.2.2”] Required for secondary zone types
dnssec_policy: Option<String>DNSSEC policy name to apply to this zone (BIND9 9.16+)
Specifies the name of a dnssec-policy block defined in named.conf.options.
When set, BIND9 will automatically sign the zone using the specified policy.
Example: "default", "high-security"
Requires inline_signing to be enabled for DNSSEC to function.
inline_signing: Option<bool>Enable inline signing for DNSSEC (BIND9 inline-signing)
When true, BIND9 will sign the zone inline rather than requiring pre-signed zone files.
This is required for DNSSEC with dynamic zones and modern BIND9 configurations.
Should be set to true when dnssec_policy is specified.
Default: false
Implementations§
Source§impl ZoneConfig
impl ZoneConfig
Sourcepub fn to_zone_file(&self) -> String
pub fn to_zone_file(&self) -> String
Generate BIND9 zone file content from structured configuration
Trait Implementations§
Source§impl Clone for ZoneConfig
impl Clone for ZoneConfig
Source§fn clone(&self) -> ZoneConfig
fn clone(&self) -> ZoneConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for ZoneConfig
impl ComposeSchema for ZoneConfig
Source§impl Debug for ZoneConfig
impl Debug for ZoneConfig
Source§impl<'de> Deserialize<'de> for ZoneConfig
impl<'de> Deserialize<'de> for ZoneConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for ZoneConfig
impl Serialize for ZoneConfig
Auto Trait Implementations§
impl Freeze for ZoneConfig
impl RefUnwindSafe for ZoneConfig
impl Send for ZoneConfig
impl Sync for ZoneConfig
impl Unpin for ZoneConfig
impl UnwindSafe for ZoneConfig
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].