1 use std::io;
2 #[cfg(unix)]
3 use std::os::unix::io::{AsRawFd, RawFd};
4 use std::time::Duration;
5 
6 pub type Event = usize;
7 
8 pub type Events = Vec<Event>;
9 
10 #[derive(Debug)]
11 pub struct Selector {}
12 
13 impl Selector {
try_clone(&self) -> io::Result<Selector>14     pub fn try_clone(&self) -> io::Result<Selector> {
15         os_required!();
16     }
17 
select(&self, _: &mut Events, _: Option<Duration>) -> io::Result<()>18     pub fn select(&self, _: &mut Events, _: Option<Duration>) -> io::Result<()> {
19         os_required!();
20     }
21 }
22 
23 #[cfg(unix)]
24 cfg_any_os_util! {
25     use crate::{Interest, Token};
26 
27     impl Selector {
28         pub fn register(&self, _: RawFd, _: Token, _: Interest) -> io::Result<()> {
29             os_required!();
30         }
31 
32         pub fn reregister(&self, _: RawFd, _: Token, _: Interest) -> io::Result<()> {
33             os_required!();
34         }
35 
36         pub fn deregister(&self, _: RawFd) -> io::Result<()> {
37             os_required!();
38         }
39     }
40 }
41 
42 cfg_net! {
43     #[cfg(debug_assertions)]
44     impl Selector {
45         pub fn id(&self) -> usize {
46             os_required!();
47         }
48     }
49 }
50 
51 #[cfg(unix)]
52 impl AsRawFd for Selector {
as_raw_fd(&self) -> RawFd53     fn as_raw_fd(&self) -> RawFd {
54         os_required!()
55     }
56 }
57 
58 pub mod event {
59     use crate::sys::Event;
60     use crate::Token;
61     use std::fmt;
62 
token(_: &Event) -> Token63     pub fn token(_: &Event) -> Token {
64         os_required!();
65     }
66 
is_readable(_: &Event) -> bool67     pub fn is_readable(_: &Event) -> bool {
68         os_required!();
69     }
70 
is_writable(_: &Event) -> bool71     pub fn is_writable(_: &Event) -> bool {
72         os_required!();
73     }
74 
is_error(_: &Event) -> bool75     pub fn is_error(_: &Event) -> bool {
76         os_required!();
77     }
78 
is_read_closed(_: &Event) -> bool79     pub fn is_read_closed(_: &Event) -> bool {
80         os_required!();
81     }
82 
is_write_closed(_: &Event) -> bool83     pub fn is_write_closed(_: &Event) -> bool {
84         os_required!();
85     }
86 
is_priority(_: &Event) -> bool87     pub fn is_priority(_: &Event) -> bool {
88         os_required!();
89     }
90 
is_aio(_: &Event) -> bool91     pub fn is_aio(_: &Event) -> bool {
92         os_required!();
93     }
94 
is_lio(_: &Event) -> bool95     pub fn is_lio(_: &Event) -> bool {
96         os_required!();
97     }
98 
debug_details(_: &mut fmt::Formatter<'_>, _: &Event) -> fmt::Result99     pub fn debug_details(_: &mut fmt::Formatter<'_>, _: &Event) -> fmt::Result {
100         os_required!();
101     }
102 }
103