/src/crosvm/cros_async/src/event.rs
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright 2020 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 | | use base::Event; |
6 | | |
7 | | use crate::IntoAsync; |
8 | | use crate::IoSource; |
9 | | |
10 | | /// An async version of `base::Event`. |
11 | | pub struct EventAsync { |
12 | | pub(crate) io_source: IoSource<Event>, |
13 | | #[cfg(windows)] |
14 | | pub(crate) reset_after_read: bool, |
15 | | } |
16 | | |
17 | | impl EventAsync { |
18 | 0 | pub fn get_io_source_ref(&self) -> &IoSource<Event> { |
19 | 0 | &self.io_source |
20 | 0 | } |
21 | | } |
22 | | |
23 | | impl IntoAsync for Event {} |