pub struct KiteTickerAsync { /* private fields */ }Expand description
The WebSocket client for connecting to Kite Connect’s streaming quotes service.
Implementations§
Source§impl KiteTickerAsync
impl KiteTickerAsync
Sourcepub async fn connect(api_key: &str, access_token: &str) -> Result<Self, String>
pub async fn connect(api_key: &str, access_token: &str) -> Result<Self, String>
Establish a connection with the Kite WebSocket server
Sourcepub async fn subscribe(
self,
instrument_tokens: &[u32],
mode: Option<Mode>,
) -> Result<KiteTickerSubscriber, String>
pub async fn subscribe( self, instrument_tokens: &[u32], mode: Option<Mode>, ) -> Result<KiteTickerSubscriber, String>
Subscribes the client to a list of instruments
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Check if the connection is still alive
Sourcepub fn receiver_count(&self) -> usize
pub fn receiver_count(&self) -> usize
Get the current broadcast channel receiver count
Sourcepub fn channel_capacity(&self) -> usize
pub fn channel_capacity(&self) -> usize
Get the current broadcast channel capacity
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KiteTickerAsync
impl !RefUnwindSafe for KiteTickerAsync
impl Send for KiteTickerAsync
impl Sync for KiteTickerAsync
impl Unpin for KiteTickerAsync
impl !UnwindSafe for KiteTickerAsync
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