poll_evented.rs
SHA-2568945a4a7886418405721f27033c5e55823485172a2ae85b41ac6aa662ac42c86
Malecule∅
Evidence
1use crate::io::driver::{Handle, Interest, Registration};
2
3use mio::event::Source;
4use std::fmt;
5use std::io;
6use std::ops::Deref;
7
8cfg_io_driver! {
9 /// Associates an I/O resource that implements the [`std::io::Read`] and/or
10 /// [`std::io::Write`] traits with the reactor that drives it.
11 ///
12 /// `PollEvented` uses [`Registration`] internally to t …
24:8… use a `PollEvented` instance concurrently. One for reading and one for
25 /// writing. While violating this requirement is "safe" from a Rust memory
26 /// model point of view, it will result in unexpec …
158:6… // Safety: We trust `TcpStream::read` to have filled up `n` bytes in the
159 // buffer.
160 buf.assume_init(n);
161 b …