pub enum QrzXmlError {
Show 15 variants
Network(Error),
XmlParsing(DeError),
UrlParsing(ParseError),
ApiError {
message: String,
},
AuthenticationFailed {
reason: String,
},
SessionExpired,
CallsignNotFound {
callsign: String,
},
DxccNotFound {
entity: String,
},
InvalidInput {
message: String,
},
ConnectionRefused,
SubscriptionRequired,
RateLimitExceeded,
NoSessionKey,
InvalidApiVersion {
version: String,
},
UnexpectedResponse {
message: String,
},
}Expand description
Comprehensive error type for all QRZ API operations
Variants§
Network(Error)
Network or HTTP-related errors
XmlParsing(DeError)
XML parsing errors
UrlParsing(ParseError)
URL parsing errors
ApiError
QRZ API returned an error message
AuthenticationFailed
Authentication failed
SessionExpired
Session expired or invalid
CallsignNotFound
Callsign not found
DxccNotFound
DXCC entity not found
InvalidInput
Invalid input provided
ConnectionRefused
QRZ service is refusing connections
SubscriptionRequired
Subscription required for this operation
RateLimitExceeded
Rate limit exceeded
NoSessionKey
No session key present in response
InvalidApiVersion
Invalid API version specified
UnexpectedResponse
Generic API error for unexpected responses
Implementations§
Source§impl QrzXmlError
impl QrzXmlError
Sourcepub fn auth_failed(reason: impl Into<String>) -> Self
pub fn auth_failed(reason: impl Into<String>) -> Self
Create a new authentication error
Sourcepub fn callsign_not_found(callsign: impl Into<String>) -> Self
pub fn callsign_not_found(callsign: impl Into<String>) -> Self
Create a new callsign not found error
Sourcepub fn dxcc_not_found(entity: impl Into<String>) -> Self
pub fn dxcc_not_found(entity: impl Into<String>) -> Self
Create a new DXCC not found error
Sourcepub fn invalid_input(message: impl Into<String>) -> Self
pub fn invalid_input(message: impl Into<String>) -> Self
Create a new invalid input error
Sourcepub fn unexpected_response(message: impl Into<String>) -> Self
pub fn unexpected_response(message: impl Into<String>) -> Self
Create a new unexpected response error
Sourcepub fn should_reauthenticate(&self) -> bool
pub fn should_reauthenticate(&self) -> bool
Check if this error indicates we should retry with authentication
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error is retryable (temporary)
Sourcepub fn is_permission_error(&self) -> bool
pub fn is_permission_error(&self) -> bool
Check if this error is due to insufficient permissions/subscription
Trait Implementations§
Source§impl Debug for QrzXmlError
impl Debug for QrzXmlError
Source§impl Display for QrzXmlError
impl Display for QrzXmlError
Source§impl Error for QrzXmlError
impl Error for QrzXmlError
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
use the Display impl or to_string()
Source§impl From<DeError> for QrzXmlError
impl From<DeError> for QrzXmlError
Source§impl From<Error> for QrzXmlError
impl From<Error> for QrzXmlError
Source§impl From<ParseError> for QrzXmlError
impl From<ParseError> for QrzXmlError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for QrzXmlError
impl !UnwindSafe for QrzXmlError
impl Freeze for QrzXmlError
impl Send for QrzXmlError
impl Sync for QrzXmlError
impl Unpin for QrzXmlError
impl UnsafeUnpin for QrzXmlError
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.