pub trait OnSubscriptionNotification: Send + Sync {
// Provided methods
fn on_subscription_status_change(
&mut self,
notification: StatusChangeNotification,
) { ... }
fn on_data_value(&mut self, notification: DataValue, item: &MonitoredItem) { ... }
fn on_event(
&mut self,
event_fields: Option<Vec<Variant>>,
item: &MonitoredItem,
) { ... }
}
Expand description
A set of callbacks for notifications on a subscription. You may implement this on your own struct, or simply use SubscriptionCallbacks for a simple collection of closures.
Provided Methods§
Sourcefn 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.
Sourcefn 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.