pub struct Report { /* private fields */ }Expand description
A batch of InputEvents, terminated with a SYN_REPORT event.
Returned by the Reports iterator.
Reports share the EventReader’s event queue via Arc where possible. If the user code
collects Reports from the iterator, fetching new reports will result in new event buffers
being allocated. If user code only lets a single Report exist at a time, Arc::make_mut
allows the EventReader to avoid unnecessary allocations.
Implementations§
Source§impl Report
impl Report
Sourcepub fn iter(&self) -> ReportIter<'_> ⓘ
pub fn iter(&self) -> ReportIter<'_> ⓘ
Returns an iterator over the InputEvents in this Report.
Report also implements IntoIterator to facilitate the same operation.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of InputEvents in this Report.
Since Reports are always terminated with a Syn::REPORT event, they always have at
least one event in them, so this method will never return 0.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Report
impl RefUnwindSafe for Report
impl Send for Report
impl Sync for Report
impl Unpin for Report
impl UnwindSafe for Report
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