pub struct SubscriptionManager { /* private fields */ }
Expand description
Manages multiple tag subscriptions
Implementations§
Source§impl SubscriptionManager
impl SubscriptionManager
Sourcepub async fn add_subscription(&self, subscription: TagSubscription)
pub async fn add_subscription(&self, subscription: TagSubscription)
Adds a new subscription
Sourcepub async fn remove_subscription(&self, tag_name: &str)
pub async fn remove_subscription(&self, tag_name: &str)
Removes a subscription
Sourcepub async fn update_value(&self, tag_name: &str, value: &PlcValue) -> Result<()>
pub async fn update_value(&self, tag_name: &str, value: &PlcValue) -> Result<()>
Updates a value for all matching subscriptions
Sourcepub async fn get_subscriptions(&self) -> Vec<TagSubscription>
pub async fn get_subscriptions(&self) -> Vec<TagSubscription>
Gets all active subscriptions
Sourcepub async fn get_subscription(&self, tag_name: &str) -> Option<TagSubscription>
pub async fn get_subscription(&self, tag_name: &str) -> Option<TagSubscription>
Gets a specific subscription by tag name
Trait Implementations§
Source§impl Clone for SubscriptionManager
impl Clone for SubscriptionManager
Source§fn clone(&self) -> SubscriptionManager
fn clone(&self) -> SubscriptionManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto 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