Async datagram traits.
Basic usage ```rust
use async_datagram::AsyncDatagram;
struct Udp;
impl AsyncDatagram for Udp { type Target = std::net::SocketAddr type Err = io::Error;
fn pollsendto(
&mut self,
waker: &Waker,
buf: &[u8],
target: Self::Target,
) -> Poll
fn pollrecvfrom(
&mut self,
waker: &Waker,
buf: &mut [u8],
) -> Poll
sh
$ cargo add async-datagram
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