pub struct Subscription { /* private fields */ }Expand description
Client-side representation of a subscription.
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub fn new(
subscription_id: u32,
publishing_interval: Duration,
lifetime_count: u32,
max_keep_alive_count: u32,
max_notifications_per_publish: u32,
priority: u8,
publishing_enabled: bool,
status_change_callback: Box<dyn OnSubscriptionNotificationCore>,
) -> Subscription
pub fn new( subscription_id: u32, publishing_interval: Duration, lifetime_count: u32, max_keep_alive_count: u32, max_notifications_per_publish: u32, priority: u8, publishing_enabled: bool, status_change_callback: Box<dyn OnSubscriptionNotificationCore>, ) -> Subscription
Creates a new subscription using the supplied parameters and the supplied data change callback.
Sourcepub fn monitored_items(&self) -> impl Iterator<Item = &MonitoredItem>
pub fn monitored_items(&self) -> impl Iterator<Item = &MonitoredItem>
Get the monitored items in this subscription.
Sourcepub fn subscription_id(&self) -> u32
pub fn subscription_id(&self) -> u32
Get the subscription ID.
Sourcepub fn publishing_interval(&self) -> Duration
pub fn publishing_interval(&self) -> Duration
Get the configured publishing interval.
Sourcepub fn lifetime_count(&self) -> u32
pub fn lifetime_count(&self) -> u32
Get the LifetimeCount parameter for this subscription.
Sourcepub fn max_keep_alive_count(&self) -> u32
pub fn max_keep_alive_count(&self) -> u32
Get the configured maximum keep alive count.
Sourcepub fn max_notifications_per_publish(&self) -> u32
pub fn max_notifications_per_publish(&self) -> u32
Get the configured maximum number of notifications per publish request.
Sourcepub fn publishing_enabled(&self) -> bool
pub fn publishing_enabled(&self) -> bool
Get whether publishing is enabled.
Sourcepub fn insert_existing_monitored_item(&mut self, item: MonitoredItem)
pub fn insert_existing_monitored_item(&mut self, item: MonitoredItem)
Insert a monitored item that has been created on the server.
If you call this yourself you are responsible for knowing that the monitored item already exists.
Auto Trait Implementations§
impl Freeze for Subscription
impl !RefUnwindSafe for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
impl !UnwindSafe for Subscription
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