pub enum NutError {
Show 28 variants
AccessDenied,
UnknownUps,
VarNotSupported,
CmdNotSupported,
InvalidArgument,
InstCmdFailed,
SetFailed,
ReadOnly,
TooLong,
FeatureNotSupported,
AlreadySslMode,
DriverNotConnected,
DataStale,
AlreadyLoggedIn,
InvalidPassword,
AlreadySetPassword,
InvalidUsername,
AlreadySetUsername,
UsernameRequired,
PasswordRequired,
UnknownCommand,
InvalidValue,
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.
VarNotSupported
The specified UPS doesn’t support the variable in the request.
CmdNotSupported
The specified UPS doesn’t support the instant command in the request.
InvalidArgument
The client sent an argument to a command which is not recognized or is otherwise invalid in this context.
InstCmdFailed
Server failed to deliver the instant command request to the driver. No further information is available to the client.
SetFailed
Server failed to deliver the set request to the driver.
ReadOnly
The requested variable in a SET command is not writable.
TooLong
The requested value in a SET command is too long.
FeatureNotSupported
The server does not support the requested feature.
AlreadySslMode
TLS/SSL mode is already enabled on this connection, so the server can’t start it again.
DriverNotConnected
The server can’t perform the requested command, since the driver for that UPS is not connected.
DataStale
Server is connected to the driver for the UPS, but that driver isn’t providing regular updates or has specifically marked the data as stale.
AlreadyLoggedIn
The client already sent LOGIN for a UPS and can’t do it again. There is presently a limit of one LOGIN record per connection.
InvalidPassword
The client sent an invalid PASSWORD - perhaps an empty one.
AlreadySetPassword
The client already set a PASSWORD and can’t set another.
InvalidUsername
The client sent an invalid USERNAME.
AlreadySetUsername
The client has already set a USERNAME, and can’t set another.
UsernameRequired
The requested command requires a username for authentication, but the client hasn’t set one.
PasswordRequired
The requested command requires a password for authentication, but the client hasn’t set one.
UnknownCommand
The server doesn’t recognize the requested command.
InvalidValue
The value specified in the request is not valid.
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.