pub struct SubscriptionManager { /* private fields */ }Expand description
Manages active subscriptions
Implementations§
Source§impl SubscriptionManager
impl SubscriptionManager
Sourcepub fn add_book_update(&mut self, orderbook_ids: Vec<String>)
pub fn add_book_update(&mut self, orderbook_ids: Vec<String>)
Add a book update subscription
Sourcepub fn remove_book_update(&mut self, orderbook_ids: &[String])
pub fn remove_book_update(&mut self, orderbook_ids: &[String])
Remove a book update subscription
Sourcepub fn is_subscribed_book_update(&self, orderbook_id: &str) -> bool
pub fn is_subscribed_book_update(&self, orderbook_id: &str) -> bool
Check if subscribed to book updates for an orderbook
Sourcepub fn add_trades(&mut self, orderbook_ids: Vec<String>)
pub fn add_trades(&mut self, orderbook_ids: Vec<String>)
Add a trades subscription
Sourcepub fn remove_trades(&mut self, orderbook_ids: &[String])
pub fn remove_trades(&mut self, orderbook_ids: &[String])
Remove a trades subscription
Sourcepub fn is_subscribed_trades(&self, orderbook_id: &str) -> bool
pub fn is_subscribed_trades(&self, orderbook_id: &str) -> bool
Check if subscribed to trades for an orderbook
Sourcepub fn remove_user(&mut self, user: &str)
pub fn remove_user(&mut self, user: &str)
Remove a user subscription
Sourcepub fn is_subscribed_user(&self, user: &str) -> bool
pub fn is_subscribed_user(&self, user: &str) -> bool
Check if subscribed to a user
Sourcepub fn add_price_history(
&mut self,
orderbook_id: String,
resolution: String,
include_ohlcv: bool,
)
pub fn add_price_history( &mut self, orderbook_id: String, resolution: String, include_ohlcv: bool, )
Add a price history subscription
Sourcepub fn remove_price_history(&mut self, orderbook_id: &str, resolution: &str)
pub fn remove_price_history(&mut self, orderbook_id: &str, resolution: &str)
Remove a price history subscription
Sourcepub fn is_subscribed_price_history(
&self,
orderbook_id: &str,
resolution: &str,
) -> bool
pub fn is_subscribed_price_history( &self, orderbook_id: &str, resolution: &str, ) -> bool
Check if subscribed to price history for an orderbook/resolution
Sourcepub fn add_market(&mut self, market_pubkey: String)
pub fn add_market(&mut self, market_pubkey: String)
Add a market subscription
Sourcepub fn remove_market(&mut self, market_pubkey: &str)
pub fn remove_market(&mut self, market_pubkey: &str)
Remove a market subscription
Sourcepub fn is_subscribed_market(&self, market_pubkey: &str) -> bool
pub fn is_subscribed_market(&self, market_pubkey: &str) -> bool
Check if subscribed to market events
Sourcepub fn get_all_subscriptions(&self) -> Vec<Subscription>
pub fn get_all_subscriptions(&self) -> Vec<Subscription>
Get all subscriptions for re-subscribing after reconnect
Sourcepub fn has_subscriptions(&self) -> bool
pub fn has_subscriptions(&self) -> bool
Check if there are any active subscriptions
Sourcepub fn subscription_count(&self) -> usize
pub fn subscription_count(&self) -> usize
Get count of active subscriptions
Sourcepub fn book_update_orderbooks(&self) -> Vec<String>
pub fn book_update_orderbooks(&self) -> Vec<String>
Get all subscribed orderbook IDs (for book updates)
Sourcepub fn trade_orderbooks(&self) -> Vec<String>
pub fn trade_orderbooks(&self) -> Vec<String>
Get all subscribed orderbook IDs (for trades)
Sourcepub fn subscribed_users(&self) -> Vec<String>
pub fn subscribed_users(&self) -> Vec<String>
Get all subscribed users
Sourcepub fn subscribed_markets(&self) -> Vec<String>
pub fn subscribed_markets(&self) -> Vec<String>
Get all subscribed markets
Trait Implementations§
Source§impl Debug for SubscriptionManager
impl Debug for SubscriptionManager
Source§impl Default for SubscriptionManager
impl Default for SubscriptionManager
Source§fn default() -> SubscriptionManager
fn default() -> SubscriptionManager
Auto Trait Implementations§
impl Freeze for SubscriptionManager
impl RefUnwindSafe for SubscriptionManager
impl Send for SubscriptionManager
impl Sync for SubscriptionManager
impl Unpin for SubscriptionManager
impl UnwindSafe for SubscriptionManager
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more