pub enum AlorApiError {
Http {
status: Option<u16>,
message: String,
},
Ws {
code: Option<u16>,
message: String,
},
Auth {
message: String,
},
NotFound {
message: String,
},
Parse(String),
RateLimitExceeded,
Subscription {
message: String,
},
}Expand description
A failure of the HTTP or WebSocket protocol layer, in the broker’s own terms.
Variants§
Http
The HTTP call failed: no status means no answer (a break, a timeout, a refused connection).
Fields
Ws
The WebSocket failed or the broker sent an error message on it.
Fields
Auth
The authorization server refused the refresh token (revoked, expired, or of another contour).
NotFound
HTTP 404: the broker does not know this order, instrument or portfolio.
Parse(String)
An answer that is a success but is not the JSON the model expects.
RateLimitExceeded
HTTP 429: the request limit of the broker is exceeded.
Subscription
A subscription cannot be made (a limit of the session, or the session is closed).
Trait Implementations§
Source§impl Debug for AlorApiError
impl Debug for AlorApiError
Source§impl Display for AlorApiError
impl Display for AlorApiError
Source§impl Error for AlorApiError
impl Error for AlorApiError
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()
Source§impl From<Error> for AlorApiError
impl From<Error> for AlorApiError
Source§impl From<Error> for AlorApiError
impl From<Error> for AlorApiError
Source§impl From<ParseError> for AlorApiError
impl From<ParseError> for AlorApiError
Source§fn from(err: ParseError) -> Self
fn from(err: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AlorApiError
impl RefUnwindSafe for AlorApiError
impl Send for AlorApiError
impl Sync for AlorApiError
impl Unpin for AlorApiError
impl UnsafeUnpin for AlorApiError
impl UnwindSafe for AlorApiError
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