pub struct LongpollPoll {
pub matches: Pin<Box<dyn Stream<Item = StreamCallbackMatch> + Send>>,
pub notifications: Pin<Box<dyn Stream<Item = StreamCallbackNotification> + Send>>,
pub errors: Pin<Box<dyn Stream<Item = AudDError> + Send>>,
/* private fields */
}Expand description
An active longpoll subscription. Three typed streams surface its output:
Self::matches— recognition matches.Self::notifications— stream-lifecycle events.Self::errors— yields a single terminal error then closes; after an error fires,matchesandnotificationsclose too.
Drop the LongpollPoll (or call Self::close) to tear down the
background poller.
Fields§
§matches: Pin<Box<dyn Stream<Item = StreamCallbackMatch> + Send>>Recognition matches.
notifications: Pin<Box<dyn Stream<Item = StreamCallbackNotification> + Send>>Stream-lifecycle notifications (e.g. stream stopped, can't connect).
errors: Pin<Box<dyn Stream<Item = AudDError> + Send>>Terminal-error stream — yields at most one error and closes.
Implementations§
Source§impl LongpollPoll
impl LongpollPoll
Trait Implementations§
Source§impl Debug for LongpollPoll
impl Debug for LongpollPoll
Auto Trait Implementations§
impl Freeze for LongpollPoll
impl !RefUnwindSafe for LongpollPoll
impl Send for LongpollPoll
impl !Sync for LongpollPoll
impl Unpin for LongpollPoll
impl UnsafeUnpin for LongpollPoll
impl !UnwindSafe for LongpollPoll
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