pub enum TqError {
Show 18 variants
PermissionDenied(String),
WebSocketError(String),
AuthenticationError(String),
ParseError(String),
NetworkError(String),
ConfigError(String),
InvalidSymbol(String),
InvalidParameter(String),
TradeError(String),
OrderNotFound(String),
NotLoggedIn,
DataNotFound(String),
InternalError(String),
Timeout,
IoError(String),
JsonError(String),
JwtError(String),
Other(String),
}Expand description
TQSDK 错误类型
Variants§
PermissionDenied(String)
权限不足错误
WebSocketError(String)
WebSocket 连接错误
AuthenticationError(String)
认证失败
ParseError(String)
数据解析错误
NetworkError(String)
网络请求错误
ConfigError(String)
配置错误
InvalidSymbol(String)
无效的合约代码
InvalidParameter(String)
无效的参数
TradeError(String)
交易错误
OrderNotFound(String)
订单不存在
NotLoggedIn
账户未登录
DataNotFound(String)
数据未找到
InternalError(String)
内部错误
Timeout
超时错误
IoError(String)
IO 错误
JsonError(String)
JSON 错误
JwtError(String)
JWT 错误
Other(String)
其他错误
Implementations§
Source§impl TqError
impl TqError
Sourcepub fn permission_denied_futures() -> Self
pub fn permission_denied_futures() -> Self
权限不足 - 期货行情
Sourcepub fn permission_denied_stocks() -> Self
pub fn permission_denied_stocks() -> Self
权限不足 - 股票行情
Sourcepub fn permission_denied_history() -> Self
pub fn permission_denied_history() -> Self
权限不足 - 历史数据
Sourcepub fn invalid_left_kline_id() -> Self
pub fn invalid_left_kline_id() -> Self
无效的 left_kline_id
Sourcepub fn invalid_focus_position() -> Self
pub fn invalid_focus_position() -> Self
无效的 focus_position
Trait Implementations§
Source§impl Error for TqError
impl Error for TqError
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<ParseError> for TqError
impl From<ParseError> for TqError
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 TqError
impl RefUnwindSafe for TqError
impl Send for TqError
impl Sync for TqError
impl Unpin for TqError
impl UnwindSafe for TqError
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.