pub enum NutError {
AccessDenied,
UnknownUps,
UnexpectedResponse,
UnknownResponseType(String),
SslNotSupported,
SslInvalidHostname,
FeatureNotConfigured,
Generic(String),
}
Expand description
A NUT-native error.
Variants§
AccessDenied
Occurs when the username/password combination is rejected.
UnknownUps
Occurs when the specified UPS device does not exist.
UnexpectedResponse
Occurs when the response type or content wasn’t expected at the current stage.
UnknownResponseType(String)
Occurs when the response type is not recognized by the client.
SslNotSupported
Occurs when attempting to use SSL in a transport that doesn’t support it, or if the server is not configured for it.
SslInvalidHostname
Occurs when trying to initialize a strict SSL connection with an invalid hostname.
FeatureNotConfigured
Occurs when the client used a feature that is disabled by the server.
Generic(String)
Generic (usually internal) client error.
Trait Implementations§
Source§impl Error for NutError
impl Error for NutError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + '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()
Auto Trait Implementations§
impl Freeze for NutError
impl RefUnwindSafe for NutError
impl Send for NutError
impl Sync for NutError
impl Unpin for NutError
impl UnwindSafe for NutError
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