pub enum DiscoveryError {
Show 15 variants
Configuration(String),
InvalidData(String),
InvalidServiceInfo {
field: String,
reason: String,
},
ServiceNotFound(String),
DnsResolution(String),
Mdns(String),
Upnp(String),
DnsSd(String),
Network(String),
Timeout(String),
Verification(String),
Protocol(String),
Io(Error),
Security(String),
Other(String),
}Expand description
The primary error type for the auto-discovery crate
Variants§
Configuration(String)
Invalid configuration error
InvalidData(String)
Invalid service data error
InvalidServiceInfo
Invalid service info error
Fields
ServiceNotFound(String)
Service not found error
DnsResolution(String)
DNS resolution error
Mdns(String)
mDNS protocol error
Upnp(String)
UPnP/SSDP protocol error
DnsSd(String)
DNS-SD protocol error
Network(String)
Network operation error
Timeout(String)
Protocol operation timeout
Verification(String)
Service verification error
Protocol(String)
Protocol error
Io(Error)
I/O error
Security(String)
Security error
Other(String)
Other error types
Implementations§
Source§impl DiscoveryError
impl DiscoveryError
Sourcepub fn configuration<S: Into<String>>(msg: S) -> Self
pub fn configuration<S: Into<String>>(msg: S) -> Self
Create a new configuration error
Sourcepub fn invalid_data<S: Into<String>>(msg: S) -> Self
pub fn invalid_data<S: Into<String>>(msg: S) -> Self
Create a new invalid data error
Sourcepub fn service_not_found<S: Into<String>>(msg: S) -> Self
pub fn service_not_found<S: Into<String>>(msg: S) -> Self
Create a new service not found error
Sourcepub fn dns_resolution<S: Into<String>>(msg: S) -> Self
pub fn dns_resolution<S: Into<String>>(msg: S) -> Self
Create a new DNS resolution error
Sourcepub fn verification<S: Into<String>>(msg: S) -> Self
pub fn verification<S: Into<String>>(msg: S) -> Self
Create a new verification error
Sourcepub fn invalid_service<S: Into<String>>(msg: S) -> Self
pub fn invalid_service<S: Into<String>>(msg: S) -> Self
Create a new invalid service error
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if error is retryable
Sourcepub fn severity(&self) -> ErrorSeverity
pub fn severity(&self) -> ErrorSeverity
Get error severity
Trait Implementations§
Source§impl Debug for DiscoveryError
impl Debug for DiscoveryError
Source§impl Display for DiscoveryError
impl Display for DiscoveryError
Source§impl Error for DiscoveryError
impl Error for DiscoveryError
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<DecodeError> for DiscoveryError
impl From<DecodeError> for DiscoveryError
Source§fn from(err: DecodeError) -> Self
fn from(err: DecodeError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for DiscoveryError
impl From<Error> for DiscoveryError
Source§impl From<Error> for DiscoveryError
impl From<Error> for DiscoveryError
Source§impl From<ParseIntError> for DiscoveryError
impl From<ParseIntError> for DiscoveryError
Source§fn from(err: ParseIntError) -> Self
fn from(err: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl From<SystemTimeError> for DiscoveryError
impl From<SystemTimeError> for DiscoveryError
Source§fn from(err: SystemTimeError) -> Self
fn from(err: SystemTimeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DiscoveryError
impl !RefUnwindSafe for DiscoveryError
impl Send for DiscoveryError
impl Sync for DiscoveryError
impl Unpin for DiscoveryError
impl !UnwindSafe for DiscoveryError
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
Mutably borrows from an owned value. Read more