1 pub(crate) use self::sys::*; 2 3 #[cfg(unix)] 4 mod sys { 5 use mio::unix::UnixReady; 6 use mio::Ready; 7 hup() -> Ready8 pub(crate) fn hup() -> Ready { 9 UnixReady::hup().into() 10 } 11 is_hup(ready: Ready) -> bool12 pub(crate) fn is_hup(ready: Ready) -> bool { 13 UnixReady::from(ready).is_hup() 14 } 15 error() -> Ready16 pub(crate) fn error() -> Ready { 17 UnixReady::error().into() 18 } 19 is_error(ready: Ready) -> bool20 pub(crate) fn is_error(ready: Ready) -> bool { 21 UnixReady::from(ready).is_error() 22 } 23 } 24 25 #[cfg(windows)] 26 mod sys { 27 use mio::Ready; 28 hup() -> Ready29 pub(crate) fn hup() -> Ready { 30 Ready::empty() 31 } 32 is_hup(_: Ready) -> bool33 pub(crate) fn is_hup(_: Ready) -> bool { 34 false 35 } 36 error() -> Ready37 pub(crate) fn error() -> Ready { 38 Ready::empty() 39 } 40 is_error(_: Ready) -> bool41 pub(crate) fn is_error(_: Ready) -> bool { 42 false 43 } 44 } 45