• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2021 The ChromiumOS Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 pub mod async_types;
6 mod error;
7 pub mod event;
8 pub mod executor;
9 pub mod handle_executor;
10 pub mod handle_source;
11 mod io_completion_port;
12 pub mod overlapped_source;
13 mod timer;
14 #[cfg(feature = "tokio")]
15 pub mod tokio_source;
16 pub mod wait_for_handle;
17 
18 pub use error::AsyncErrorSys;
19 pub use executor::ExecutorKindSys;
20 pub use handle_executor::HandleReactor;
21 pub use handle_source::HandleSource;
22 pub use handle_source::HandleWrapper;
23 pub use overlapped_source::OverlappedSource;
24 pub(crate) use wait_for_handle::WaitForHandle;
25 
26 use crate::Error;
27 
28 impl From<Error> for std::io::Error {
from(e: Error) -> Self29     fn from(e: Error) -> Self {
30         use Error::*;
31         match e {
32             EventAsync(e) => e.into(),
33             HandleExecutor(e) => e.into(),
34             Io(e) => e,
35             Timer(e) => e.into(),
36             TimerAsync(e) => e.into(),
37         }
38     }
39 }
40