1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2021 The ChromiumOS Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

pub mod async_types;
pub mod event;
pub mod executor;
pub mod fd_executor;
pub mod poll_source;
pub mod uring_executor;
pub mod uring_source;
pub use poll_source::Error as PollSourceError;
pub use poll_source::PollSource;
pub use uring_source::UringSource;
mod timer;

use crate::Error;

impl From<Error> for std::io::Error {
    fn from(e: Error) -> Self {
        use Error::*;
        match e {
            EventAsync(e) => e.into(),
            Io(e) => e,
            URingExecutor(e) => e.into(),
            PollSource(e) => e.into(),
            Timer(e) => e.into(),
            TimerAsync(e) => e.into(),
        }
    }
}