pub struct TqAuth { /* private fields */ }Expand description
天勤认证实现
Implementations§
Trait Implementations§
Source§impl Authenticator for TqAuth
impl Authenticator for TqAuth
Source§fn base_header(&self) -> HeaderMap
fn base_header(&self) -> HeaderMap
获取包含认证信息的 HTTP Header
Source§fn login<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
执行登录操作
Source§fn get_td_url<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
broker_id: &'life1 str,
account_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<BrokerInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_td_url<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
broker_id: &'life1 str,
account_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<BrokerInfo>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
获取指定期货公司的交易服务器地址
Source§fn get_md_url<'life0, 'async_trait>(
&'life0 self,
stock: bool,
backtest: bool,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_md_url<'life0, 'async_trait>(
&'life0 self,
stock: bool,
backtest: bool,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
获取行情服务器地址
Source§fn has_feature(&self, feature: &str) -> bool
fn has_feature(&self, feature: &str) -> bool
检查是否具有指定的功能权限
Source§fn get_auth_id(&self) -> &str
fn get_auth_id(&self) -> &str
获取认证 ID
Source§fn get_access_token(&self) -> &str
fn get_access_token(&self) -> &str
获取访问令牌
Auto Trait Implementations§
impl Freeze for TqAuth
impl RefUnwindSafe for TqAuth
impl Send for TqAuth
impl Sync for TqAuth
impl Unpin for TqAuth
impl UnwindSafe for TqAuth
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