pub struct DataChangeCallback { /* private fields */ }Expand description
A wrapper around a data change callback that implements OnSubscriptionNotification
Implementations§
Source§impl DataChangeCallback
impl DataChangeCallback
Sourcepub fn new(
data_value: impl FnMut(DataValue, &MonitoredItem) + Send + Sync + 'static,
) -> DataChangeCallback
pub fn new( data_value: impl FnMut(DataValue, &MonitoredItem) + Send + Sync + 'static, ) -> DataChangeCallback
Create a new data change callback wrapper.
§Arguments
data_value- Called for each received data value.
Trait Implementations§
Source§impl OnSubscriptionNotification for DataChangeCallback
impl OnSubscriptionNotification for DataChangeCallback
Source§fn on_data_value(&mut self, notification: DataValue, item: &MonitoredItem)
fn on_data_value(&mut self, notification: DataValue, item: &MonitoredItem)
Called for each data value change.
Source§fn on_subscription_status_change(
&mut self,
notification: StatusChangeNotification,
)
fn on_subscription_status_change( &mut self, notification: StatusChangeNotification, )
Called when a subscription changes state on the server.
Auto Trait Implementations§
impl Freeze for DataChangeCallback
impl !RefUnwindSafe for DataChangeCallback
impl Send for DataChangeCallback
impl Sync for DataChangeCallback
impl Unpin for DataChangeCallback
impl UnsafeUnpin for DataChangeCallback
impl !UnwindSafe for DataChangeCallback
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
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> 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> IntoAnyArc for T
impl<T> IntoAnyArc for T
Source§impl<T> OnSubscriptionNotificationCore for T
impl<T> OnSubscriptionNotificationCore for T
Source§fn on_subscription_notification(
&mut self,
notification: NotificationMessage,
monitored_items: MonitoredItemMap<'_>,
)
fn on_subscription_notification( &mut self, notification: NotificationMessage, monitored_items: MonitoredItemMap<'_>, )
Called when a notification is received on a subscription.