-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
I'd like to stabilize calloop's public API to reduce breaking changes. This way when we release v1.0, we shouldn't have to release v2.0. Since we have no more public dependencies as of v0.14.0 this is now feasible.
Potential semver hazards, just from glancing over docs.rs:
- It should be explicitly stated somewhere that
calloopis not compatible with the web. We also don't support WASI at the moment. -
calloop::Readiness,calloop::Mode,calloop::PostActionandcalloop::Interestcould benon_exhaustive. User code doesn't need to match on these. -
calloop::Readiness'serrorfield could be removed, since it's not emitted bypolling. -
calloop::futures::ExecutorDestroyedshould be made non-instantiable by users. - We can probably deprecate/remove
calloop::generic::FdWrapper, since it can be replaced byBorrowedFd::borrow_raw. - Make the
pubfields ofGenericnot exposed, or only exposed via methods. - Make
calloop::io::{Readable, Writable}returnResult<()>instead of(). - Make
calloop::ping::{Ping, PingSource}a newtype wrapper instead of a type alias. - Make
calloop::signal::Singals's method takeimpl IntoIterator<Item = impl Borrow<Signal>>instead of&[Signal]to increase compatibility. - Do we want to keep
calloop::timer::Timer::current_deadline? ForEventSource::Error, what do we gain from it beingSync? Especially since the rest ofcalloopis usually thread-unsafe.- Do we want to expose
RefCell::refinDispatcher? It might be better to use closures here. -
EventLoop::try_newshould be renamed toEventLoop::new. (Rename EventLoop::try_new to new #217)
Other possible improvements:
- Enable all features on docs.rs
- Web compatibility? Probably not feasible.
- Add a way to get a
LoopHandlereference without cloning the loopRc.
Metadata
Metadata
Assignees
Labels
No labels