ZoneConfig

Struct ZoneConfig 

Source
pub struct ZoneConfig {
Show 44 fields pub zone_name: String, pub class: DnsClass, pub zone_type: ZoneType, pub file: Option<String>, pub primaries: Option<Vec<PrimarySpec>>, pub also_notify: Option<Vec<IpAddr>>, pub notify: Option<NotifyMode>, pub allow_query: Option<Vec<IpAddr>>, pub allow_transfer: Option<Vec<IpAddr>>, pub allow_update: Option<Vec<IpAddr>>, pub allow_update_raw: Option<String>, pub allow_update_forwarding: Option<Vec<IpAddr>>, pub allow_notify: Option<Vec<IpAddr>>, pub max_transfer_time_in: Option<u32>, pub max_transfer_time_out: Option<u32>, pub max_transfer_idle_in: Option<u32>, pub max_transfer_idle_out: Option<u32>, pub transfer_source: Option<IpAddr>, pub transfer_source_v6: Option<IpAddr>, pub notify_source: Option<IpAddr>, pub notify_source_v6: Option<IpAddr>, pub update_policy: Option<String>, pub journal: Option<String>, pub ixfr_from_differences: Option<bool>, pub inline_signing: Option<bool>, pub auto_dnssec: Option<AutoDnssecMode>, pub key_directory: Option<String>, pub sig_validity_interval: Option<u32>, pub dnskey_sig_validity: Option<u32>, pub forward: Option<ForwardMode>, pub forwarders: Option<Vec<ForwarderSpec>>, pub check_names: Option<CheckNamesMode>, pub check_mx: Option<CheckNamesMode>, pub check_integrity: Option<bool>, pub masterfile_format: Option<MasterfileFormat>, pub max_zone_ttl: Option<u32>, pub max_refresh_time: Option<u32>, pub min_refresh_time: Option<u32>, pub max_retry_time: Option<u32>, pub min_retry_time: Option<u32>, pub multi_master: Option<bool>, pub request_ixfr: Option<bool>, pub request_expire: Option<bool>, pub raw_options: HashMap<String, String>,
}
Expand description

Zone configuration from rndc showzone

Fields§

§zone_name: String§class: DnsClass§zone_type: ZoneType§file: Option<String>§primaries: Option<Vec<PrimarySpec>>§also_notify: Option<Vec<IpAddr>>§notify: Option<NotifyMode>§allow_query: Option<Vec<IpAddr>>§allow_transfer: Option<Vec<IpAddr>>§allow_update: Option<Vec<IpAddr>>§allow_update_raw: Option<String>

Raw allow-update directive (e.g., “{ key "name"; }”) Used to preserve key-based allow-update when no IPs are specified

§allow_update_forwarding: Option<Vec<IpAddr>>§allow_notify: Option<Vec<IpAddr>>§max_transfer_time_in: Option<u32>§max_transfer_time_out: Option<u32>§max_transfer_idle_in: Option<u32>§max_transfer_idle_out: Option<u32>§transfer_source: Option<IpAddr>§transfer_source_v6: Option<IpAddr>§notify_source: Option<IpAddr>§notify_source_v6: Option<IpAddr>§update_policy: Option<String>

Raw update-policy directive (complex grammar, kept as raw)

§journal: Option<String>§ixfr_from_differences: Option<bool>§inline_signing: Option<bool>§auto_dnssec: Option<AutoDnssecMode>§key_directory: Option<String>§sig_validity_interval: Option<u32>§dnskey_sig_validity: Option<u32>§forward: Option<ForwardMode>§forwarders: Option<Vec<ForwarderSpec>>§check_names: Option<CheckNamesMode>§check_mx: Option<CheckNamesMode>§check_integrity: Option<bool>§masterfile_format: Option<MasterfileFormat>§max_zone_ttl: Option<u32>§max_refresh_time: Option<u32>§min_refresh_time: Option<u32>§max_retry_time: Option<u32>§min_retry_time: Option<u32>§multi_master: Option<bool>§request_ixfr: Option<bool>§request_expire: Option<bool>§raw_options: HashMap<String, String>

Raw options that weren’t parsed into structured fields Key: option name (e.g., “zone-statistics”) Value: raw value as it appears in config (e.g., “yes” or “{ … }”)

Implementations§

Source§

impl ZoneConfig

Source

pub fn new(zone_name: String, zone_type: ZoneType) -> Self

Create a new zone configuration

Source

pub fn to_rndc_block(&self) -> String

Serialize to RNDC-compatible zone config block

Returns the configuration in the format expected by rndc modzone and rndc addzone, e.g., { type primary; file "..."; ... };

Trait Implementations§

Source§

impl Clone for ZoneConfig

Source§

fn clone(&self) -> ZoneConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ZoneConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ZoneConfig

Source§

fn eq(&self, other: &ZoneConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for ZoneConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more