Trait OnSubscriptionNotification

Source
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§

Source

fn on_subscription_status_change( &mut self, notification: StatusChangeNotification, )

Called when a subscription changes state on the server.

Source

fn on_data_value(&mut self, notification: DataValue, item: &MonitoredItem)

Called for each data value change.

Source

fn on_event(&mut self, event_fields: Option<Vec<Variant>>, item: &MonitoredItem)

Called for each received event.

Implementors§