#[non_exhaustive]pub enum Error {
Show 15 variants
LoginFailure(String),
LoginFailureMissingEnv(String),
WebServer(u16, String, String),
WebSocket(Box<Error>),
Serde(Error),
URL(ParseError),
HTTPClient(Error),
Volga(Option<String>),
API(String),
REST(RESTErrorList),
TLS(Error),
DNSName(InvalidDnsNameError),
IO(Error),
General(String),
InvalidURI(InvalidUri),
}Expand description
Error returned by client functions
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LoginFailure(String)
Login failed
LoginFailureMissingEnv(String)
Application login failed because an environment variable is missing
WebServer(u16, String, String)
Failed returned by the HTTP server
WebSocket(Box<Error>)
Websocket error
Serde(Error)
JSON serialization/deserialization error
URL(ParseError)
URL parsing error
HTTPClient(Error)
HTTP client error
Volga(Option<String>)
Volga error
API(String)
This error is returned if we get data from the API we can’t parse/understand
REST(RESTErrorList)
This error is returned from the REST API, this typically means the client did something wrong.
TLS(Error)
TLS Errors
DNSName(InvalidDnsNameError)
DNS Error
IO(Error)
IO Errors
General(String)
General Error
InvalidURI(InvalidUri)
Convert web socket URL to URI
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
Source§impl From<InvalidDnsNameError> for Error
impl From<InvalidDnsNameError> for Error
Source§fn from(source: InvalidDnsNameError) -> Self
fn from(source: InvalidDnsNameError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidUri> for Error
impl From<InvalidUri> for Error
Source§fn from(source: InvalidUri) -> Self
fn from(source: InvalidUri) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
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.