pub enum Error {
Show 23 variants
InvalidToken,
AccountNotFound,
Request(Error),
BoxedError(Box<dyn StdErrorTrait + Send + Sync>),
StreamIssue(String),
StopStream,
Json(Error),
SymbolNotSet,
AccountIdNotSet,
TradeActionNotSet,
TimeInForceNotSet,
OrderTypeNotSet,
QuantityNotSet,
OptionLegsNotSet,
OrderRequestsNotSet,
OrderGroupTypeNotSet,
BadRequest(String),
Unauthorized(String),
Forbidden(String),
TooManyRequests(String),
InternalServerError(String),
GatewayTimeout(String),
UnknownTradeStationAPIError,
}Expand description
TradeStation API Client Error
Variants§
InvalidToken
Issue with your current Token the Client is using.
AccountNotFound
An Account was not found for a given account id.
Request(Error)
An HTTP request error.
BoxedError(Box<dyn StdErrorTrait + Send + Sync>)
StreamIssue(String)
Error while in stream
StopStream
Use this to stop a stream connection.
Json(Error)
Error with JSON serializing or deseializing.
SymbolNotSet
No symbol set when one was required.
AccountIdNotSet
Account Id not set when one was required.
TradeActionNotSet
Trade Action not set when one was required.
TimeInForceNotSet
Time In Force not set when one was required.
OrderTypeNotSet
Order Type not set when one was required.
QuantityNotSet
Quantity not set when one was required.
OptionLegsNotSet
No Option legs set when they were required.
OrderRequestsNotSet
Order Requests not set when they’re required.
OrderGroupTypeNotSet
Order Group Type not set when it’s required.
BadRequest(String)
TradeStation API Error for a bad request
TradeStation API Error for an unauthorized request.
Forbidden(String)
TradeStation API Error for a forbidden request.
TooManyRequests(String)
TradeStation API Error for too many requests.
InternalServerError(String)
TradeStation API Error for an internal server error.
GatewayTimeout(String)
TradeStation API Error for a gateway timeout.
UnknownTradeStationAPIError
TradeStation API Error for an unkown error.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · 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
Source§impl From<Box<dyn Error + Send + Sync>> for Error
Implement error conversion (<Box<dyn StdErrorTrait + Send + Sync>> -> Error)
impl From<Box<dyn Error + Send + Sync>> for Error
Implement error conversion (<Box<dyn StdErrorTrait + Send + Sync>> -> Error)
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
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.