pub struct QuoteSubscription { /* private fields */ }Expand description
Quote 订阅
Implementations§
Source§impl QuoteSubscription
impl QuoteSubscription
Sourcepub fn new(
dm: Arc<DataManager>,
ws: Arc<TqQuoteWebsocket>,
initial_symbols: Vec<String>,
) -> Self
pub fn new( dm: Arc<DataManager>, ws: Arc<TqQuoteWebsocket>, initial_symbols: Vec<String>, ) -> Self
创建新的 Quote 订阅
Sourcepub async fn add_symbols(&self, symbols: &[&str]) -> Result<()>
pub async fn add_symbols(&self, symbols: &[&str]) -> Result<()>
添加合约
Sourcepub async fn remove_symbols(&self, symbols: &[&str]) -> Result<()>
pub async fn remove_symbols(&self, symbols: &[&str]) -> Result<()>
移除合约
Sourcepub fn quote_channel(&self) -> Receiver<Quote>
pub fn quote_channel(&self) -> Receiver<Quote>
获取 Quote 更新通道(克隆接收端)
Auto Trait Implementations§
impl Freeze for QuoteSubscription
impl !RefUnwindSafe for QuoteSubscription
impl Send for QuoteSubscription
impl Sync for QuoteSubscription
impl !Unpin for QuoteSubscription
impl !UnwindSafe for QuoteSubscription
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