v0.3.0
Breaking Changes
HotplugMonitorno longer implementsIterator, but now implementsIntoIterator.HotplugMonitornow yieldsHotplugEvents instead of already-openedEvdevs.- Call
HotplugEvent::opento open the device.
- Call
hotplug::enumeratehas moved toenumerate_hotplugin the crate root.
New Features
Async
EventReader now allows reading events and reports via async.
This functionality requires enabling either the "tokio" or "async-io" Cargo features.
Note that a lot of evdev functionality cannot be made async and will always block.
Only reading events asynchronously via the EventReader is supported for now.
Other Changes
- FreeBSD: sleep after connecting to
devdto ensure no events go missing. - Mark some methods
#[inline]for more efficient code generation. - Don't redundantly invoke
fcntlif the non-blocking status is already what we want. - Implement
AsFdandIntoRawFdforHotplugMonitor. - Include device path in error message if opening fails.
- Add
Report::len, returning the number of events in theReport. - Device enumeration iterators have been made real types instead of
impl Iteratorand moved to
theenumeratemodule.