Async readiness traits. Useful when implementing async state machine internals,
without directly relying on custom Futures structs. For example
romio::TcpListener
and romio::TcpStream
.
Basic usage ```rust
use std::pin::Pin; use std::task::{Poll, Waker}; use futures::prelude::*; use std::io;
struct Fut;
impl Future for Fut {
type Output = ();
fn poll(self: Pin<&mut Self>, waker: &Waker) -> Poll
impl ready::Ready for Fut {
type Ok = ();
type Err = io::Error;
fn poll_ready(&self, waker: &Waker)
-> Poll
sh
$ cargo add ready
This crate uses #![deny(unsafe_code)]
to ensure everything is implemented in
100% Safe Rust.
Want to join us? Check out our "Contributing" guide and take a look at some of these issues:
None.
MIT OR Apache-2.0