Upgrading mio 0.4 to 0.5
Breaking0.4.4 → 0.5.1Breaking7Platform1New1Changed4Fixed1
BreakingUpgrade verdict
7 breaking changes and a platform requirement change.
In plain terms
- The method for registering event sources has a new name.
- Configuration is now set through builder methods instead of struct fields, and the config can no longer be copied implicitly.
- The TcpSocket type is no longer exported for callers to use.
- Types from the bytes crate are no longer re-exported, so import them from bytes directly.
Must act Top 4 of 8 that need code or config changes
What you must change
Breaking7
Renames
EventLoop::register_opt to EventLoop::register.EventLoop::register_optEventLoop::registerMakes
EventLoopConfig a builder without public fields and no longer Copy.EventLoopConfigRemoves
TcpSocket from the public API.TcpSocketStops re-exporting bytes types.
TcpListener::accept now also returns the remote peer address.TcpListeneracceptUdpSocket::{send_to, recv_from} take slices directly and return byte counts.UdpSocket::send_toUdpSocket::recv_fromBufMutBufPermanently associates mio's socket types with an EventLoop.
Platform1
Adds Android support.