pub struct SubscriptionManager { /* private fields */ }Expand description
Subscription manager
Implementations§
Source§impl SubscriptionManager
impl SubscriptionManager
Sourcepub fn add_subscription(
&mut self,
channel: String,
channel_type: SubscriptionChannel,
instrument: Option<String>,
)
pub fn add_subscription( &mut self, channel: String, channel_type: SubscriptionChannel, instrument: Option<String>, )
Add a subscription
Sourcepub fn add_subscription_from_channel(
&mut self,
channel_type: SubscriptionChannel,
)
pub fn add_subscription_from_channel( &mut self, channel_type: SubscriptionChannel, )
Add a subscription from channel type
Sourcepub fn remove_subscription(&mut self, channel: &str) -> Option<Subscription>
pub fn remove_subscription(&mut self, channel: &str) -> Option<Subscription>
Remove a subscription
Sourcepub fn active_subscriptions(&self) -> Vec<&Subscription>
pub fn active_subscriptions(&self) -> Vec<&Subscription>
Get all active subscriptions
Sourcepub fn get_subscription(&self, channel: &str) -> Option<&Subscription>
pub fn get_subscription(&self, channel: &str) -> Option<&Subscription>
Get subscription by channel
Sourcepub fn deactivate_subscription(&mut self, channel: &str)
pub fn deactivate_subscription(&mut self, channel: &str)
Mark subscription as inactive
Sourcepub fn reactivate_all(&mut self)
pub fn reactivate_all(&mut self)
Reactivate all subscriptions
Sourcepub fn get_all_channels(&self) -> Vec<String>
pub fn get_all_channels(&self) -> Vec<String>
Get all channel names
Sourcepub fn get_active_channels(&self) -> Vec<String>
pub fn get_active_channels(&self) -> Vec<String>
Get active channel names
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
Returns the “default value” for a type. Read more
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<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