pub enum AppError {
Show 15 variants
Network(Error),
Io(Error),
Json(Error),
Unexpected(StatusCode),
Db(Error),
Unauthorized,
OAuthTokenExpired,
NotFound,
RateLimitExceeded,
HistoricalDataAllowanceExceeded {
allowance_expiry: u64,
},
SerializationError(String),
WebSocketError(String),
Deserialization(String),
InvalidInput(String),
Generic(String),
}Expand description
General application error type
Variants§
Network(Error)
Network error from reqwest
Io(Error)
I/O error
Json(Error)
JSON serialization or deserialization error
Unexpected(StatusCode)
Unexpected HTTP status code
Db(Error)
Database error from sqlx
Unauthorized access error
OAuthTokenExpired
OAuth token expired error (requires token refresh)
NotFound
Resource not found error
RateLimitExceeded
API rate limit exceeded
HistoricalDataAllowanceExceeded
Historical data allowance exhausted (weekly quota of data points)
The allowance_expiry field indicates the number of seconds
until the allowance resets. Retrying before that is pointless.
SerializationError(String)
Error during serialization or deserialization
WebSocketError(String)
WebSocket communication error
Deserialization(String)
Deserialization error with details
InvalidInput(String)
Invalid input error with a description of the constraint violated
Generic(String)
Generic error for cases that don’t fit other categories
Trait Implementations§
Source§impl Error for AppError
impl Error for AppError
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<LightstreamerError> for AppError
impl From<LightstreamerError> for AppError
Source§fn from(e: LightstreamerError) -> Self
fn from(e: LightstreamerError) -> Self
Auto Trait Implementations§
impl Freeze for AppError
impl !RefUnwindSafe for AppError
impl Send for AppError
impl Sync for AppError
impl Unpin for AppError
impl UnsafeUnpin for AppError
impl !UnwindSafe for AppError
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
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§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.