pub enum DnsError {
Zone(ZoneError),
Record(RecordError),
Instance(InstanceError),
Tsig(TsigError),
ZoneTransfer(ZoneTransferError),
Generic(String),
}Expand description
Composite error type that encompasses all DNS operation errors.
This is the primary error type returned by Bindy’s DNS operation functions. It provides a unified interface for handling all possible DNS-related errors.
Variants§
Zone(ZoneError)
Zone-related error (creation, deletion, not found, etc.)
Record(RecordError)
DNS record-related error (update, query, deletion, etc.)
Instance(InstanceError)
BIND9 instance or bindcar API unavailability
Tsig(TsigError)
TSIG authentication or key management error
ZoneTransfer(ZoneTransferError)
Zone transfer error
Generic(String)
Generic error for operations that don’t fit other categories
Implementations§
Source§impl DnsError
impl DnsError
Sourcepub fn is_transient(&self) -> bool
pub fn is_transient(&self) -> bool
Returns true if this error is transient and the operation should be retried.
Transient errors include network failures, timeouts, and temporary unavailability. Non-transient errors include not found, invalid data, and authentication failures.
Sourcepub fn status_reason(&self) -> &'static str
pub fn status_reason(&self) -> &'static str
Returns the Kubernetes status reason code for this error.
This is used when updating CRD status conditions to provide structured error information.
Trait Implementations§
Source§impl Error for DnsError
impl Error for DnsError
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
Source§impl From<InstanceError> for DnsError
impl From<InstanceError> for DnsError
Source§fn from(source: InstanceError) -> Self
fn from(source: InstanceError) -> Self
Source§impl From<RecordError> for DnsError
impl From<RecordError> for DnsError
Source§fn from(source: RecordError) -> Self
fn from(source: RecordError) -> Self
Source§impl From<ZoneTransferError> for DnsError
impl From<ZoneTransferError> for DnsError
Source§fn from(source: ZoneTransferError) -> Self
fn from(source: ZoneTransferError) -> Self
Auto Trait Implementations§
impl Freeze for DnsError
impl RefUnwindSafe for DnsError
impl Send for DnsError
impl Sync for DnsError
impl Unpin for DnsError
impl UnwindSafe for DnsError
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.