pub struct AsyncEvents<'a> { /* private fields */ }Available on crate features
tokio or async-io only.Expand description
An asynchronous iterator over InputEvents produced by an EventReader.
Returned by EventReader::async_events.
Note that this type does not yet implement the AsyncIterator trait, since that is still
unstable.
To fetch InputEvents, use AsyncEvents::next_event.
Implementations§
Source§impl<'a> AsyncEvents<'a>
impl<'a> AsyncEvents<'a>
Sourcepub async fn next_event(&mut self) -> Result<InputEvent>
pub async fn next_event(&mut self) -> Result<InputEvent>
Asynchronously fetches the next InputEvent from the EventReader.
When using the "tokio" feature, this method must be called from within a tokio context.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for AsyncEvents<'a>
impl<'a> RefUnwindSafe for AsyncEvents<'a>
impl<'a> Send for AsyncEvents<'a>
impl<'a> Sync for AsyncEvents<'a>
impl<'a> Unpin for AsyncEvents<'a>
impl<'a> !UnwindSafe for AsyncEvents<'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