Skip to main content

Events

Struct Events 

Source
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

Source

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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub async fn disconnect(self)

Cancel the outstanding request and close the dedicated subscription and session.

Auto Trait Implementations§

§

impl !RefUnwindSafe for Events

§

impl !UnwindSafe for Events

§

impl Forget for Events

§

impl Freeze for Events

§

impl Move for Events

§

impl Send for Events

§

impl Sync for Events

§

impl Unpin for Events

§

impl UnsafeUnpin for Events

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.