pub struct Events(/* private fields */);Expand description
An event stream on a dedicated pinned session. Each notification contains the selected Variants in caller order. Keep a pending Publish alive across cancelled or timed-out waits. The server buffers events between calls; poll regularly within its subscription lifetime.
Implementations§
Source§impl Events
impl Events
Sourcepub async fn refresh_conditions(
&mut self,
) -> Result<CallOutcome, ConditionError>
pub async fn refresh_conditions( &mut self, ) -> Result<CallOutcome, ConditionError>
Request retained condition events for this subscription on its own authenticated session.
It can run while an outstanding Publish waits for a notification or keepalive.
A Good method result accepts the request. Observe RefreshStart and RefreshEnd events and
retained notifications through Events::next to complete a refresh.
Source§impl Events
impl Events
Sourcepub fn stable_node(&self, node: &NodeId) -> Result<NodeId, EventError>
pub fn stable_node(&self, node: &NodeId) -> Result<NodeId, EventError>
Translate a raw NodeId from an event delivered by this session to a URI-qualified identity.
Sourcepub async fn connect(
config: ConnectionConfig<'_>,
options: ConnectionOptions<'_>,
notifier: &NodeId,
fields: &[EventField],
interval: Duration,
) -> Result<Self, EventError>
pub async fn connect( config: ConnectionConfig<'_>, options: ConnectionOptions<'_>, notifier: &NodeId, fields: &[EventField], interval: Duration, ) -> Result<Self, EventError>
Open a fresh authenticated session dedicated to one event notifier, and select 1–32 ordered fields. Publishing interval: 10 ms to 60 s. Hidden EventType, SourceNode and SourceName fields recognize queue overflow notifications and concrete subtypes. The host can use a separate client for reads.
Sourcepub async fn connect_with_rollover(
config: ConnectionConfig<'_>,
options: ConnectionOptions<'_>,
rollover: CertificateRollover<'_>,
notifier: &NodeId,
fields: &[EventField],
interval: Duration,
) -> Result<Self, EventError>
pub async fn connect_with_rollover( config: ConnectionConfig<'_>, options: ConnectionOptions<'_>, rollover: CertificateRollover<'_>, notifier: &NodeId, fields: &[EventField], interval: Duration, ) -> Result<Self, EventError>
Open an event session with an independently reviewed successor leaf and a deadline on
the original leaf. Pin selection uses the same checks as Client::connect_with_rollover.
Sourcepub async fn next(&mut self, wait: Duration) -> Result<Vec<Variant>, EventError>
pub async fn next(&mut self, wait: Duration) -> Result<Vec<Variant>, EventError>
Wait for the next ordered event. Eligible retained messages are recovered via Republish.
Sourcepub async fn next_with_sequence(
&mut self,
wait: Duration,
) -> Result<Sequenced<Vec<Variant>>, EventError>
pub async fn next_with_sequence( &mut self, wait: Duration, ) -> Result<Sequenced<Vec<Variant>>, EventError>
Return the Publish sequence and whether the event was recovered from the server’s retransmission queue.
Sourcepub async fn disconnect(self)
pub async fn disconnect(self)
Cancel the outstanding request and close the dedicated subscription and session.