pub struct BrowserEventStream<'a> { /* private fields */ }Available on crate feature
async only.Expand description
Async stream of BrowserAsyncEvent from a crate::browser::Browser.
Implementations§
Source§impl<'a> BrowserEventStream<'a>
impl<'a> BrowserEventStream<'a>
Sourcepub fn subscribe(browser: &'a Browser, capacity: usize) -> Self
pub fn subscribe(browser: &'a Browser, capacity: usize) -> Self
Subscribe to browser state and browse-result updates.
Sourcepub const fn next(&self) -> NextItem<'_, BrowserAsyncEvent>
pub const fn next(&self) -> NextItem<'_, BrowserAsyncEvent>
Asynchronously wait for the next event.
Sourcepub fn try_next(&self) -> Option<BrowserAsyncEvent>
pub fn try_next(&self) -> Option<BrowserAsyncEvent>
Try to get an event without blocking.
Sourcepub fn buffered_count(&self) -> usize
pub fn buffered_count(&self) -> usize
Number of events currently buffered.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BrowserEventStream<'a>
impl<'a> !UnwindSafe for BrowserEventStream<'a>
impl<'a> Freeze for BrowserEventStream<'a>
impl<'a> Send for BrowserEventStream<'a>
impl<'a> Sync for BrowserEventStream<'a>
impl<'a> Unpin for BrowserEventStream<'a>
impl<'a> UnsafeUnpin for BrowserEventStream<'a>
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