(&mut self, fd: &T, token: EpollDispatch)
| 297 | } |
| 298 | |
| 299 | pub fn add_event<T>(&mut self, fd: &T, token: EpollDispatch) -> result::Result<(), io::Error> |
| 300 | where |
| 301 | T: AsRawFd, |
| 302 | { |
| 303 | let dispatch_index = token as u64; |
| 304 | epoll::ctl( |
| 305 | self.epoll_file.as_raw_fd(), |
| 306 | epoll::ControlOptions::EPOLL_CTL_ADD, |
| 307 | fd.as_raw_fd(), |
| 308 | epoll::Event::new(epoll::Events::EPOLLIN, dispatch_index), |
| 309 | )?; |
| 310 | |
| 311 | Ok(()) |
| 312 | } |
| 313 | |
| 314 | #[cfg(fuzzing)] |
| 315 | pub fn add_event_custom<T>( |
no test coverage detected