pub enum ZoneError {
ZoneNotFound {
zone: String,
endpoint: String,
},
ZoneCreationFailed {
zone: String,
endpoint: String,
reason: String,
},
ZoneAlreadyExists {
zone: String,
endpoint: String,
},
ZoneDeletionFailed {
zone: String,
endpoint: String,
reason: String,
},
InvalidZoneConfiguration {
zone: String,
reason: String,
},
}Expand description
Errors that can occur during DNS zone operations via Bindcar HTTP API.
These errors represent failures when interacting with the Bindcar HTTP API on BIND9 instances for zone management operations.
Variants§
ZoneNotFound
Zone not found (HTTP 404 from bindcar API)
Returned when attempting to operate on a zone that doesn’t exist on the BIND9 server. This could happen if the zone was deleted externally or was never created.
Fields
ZoneCreationFailed
Failed to create a new zone (generic creation error)
Returned when zone creation fails for reasons other than the zone already existing. This could be due to invalid zone configuration, filesystem errors, or BIND9 internal errors.
Fields
ZoneAlreadyExists
Zone already exists when attempting to create a new zone
Returned when attempting to create a zone that already exists on the BIND9 server. This is typically a non-fatal error that can be safely ignored.
Fields
ZoneDeletionFailed
Failed to delete a zone
Returned when zone deletion fails. This could be due to the zone being in use, permissions issues, or BIND9 being unable to clean up zone files.
Fields
InvalidZoneConfiguration
Invalid zone configuration
Returned when the zone configuration is malformed or contains invalid parameters. This includes invalid SOA records, bad nameserver IPs, or invalid zone type.
Trait Implementations§
Source§impl Error for ZoneError
impl Error for ZoneError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for ZoneError
impl RefUnwindSafe for ZoneError
impl Send for ZoneError
impl Sync for ZoneError
impl Unpin for ZoneError
impl UnwindSafe for ZoneError
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.