pub struct EventStream<T: DecodeXml> { /* private fields */ }Expand description
Manages a live subscription to an event stream for a service.
While this object is live, the event stream will be renewed
every minute.
The stream isn’t automatically cancelled on Drop because there
is no async-Drop, but you can call the unsubscribe method
to explicitly cancel it.
The stream dispatching machinery has liveness checking that will ping
the internal receiver and will cancel the subscription after about
a minute or so of the EventStream being dropped.
Implementations§
Source§impl<T: DecodeXml> EventStream<T>
impl<T: DecodeXml> EventStream<T>
Sourcepub async fn unsubscribe(self)
pub async fn unsubscribe(self)
Explicitly cancel the subscription
Auto Trait Implementations§
impl<T> Freeze for EventStream<T>
impl<T> RefUnwindSafe for EventStream<T>
impl<T> Send for EventStream<T>
impl<T> Sync for EventStream<T>
impl<T> Unpin for EventStream<T>
impl<T> UnwindSafe for EventStream<T>
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