xref: /aosp_15_r20/external/crosvm/cros_async/src/event.rs (revision bb4ee6a4ae7042d18b07a98463b9c8b875e44b39)
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 {
get_io_source_ref(&self) -> &IoSource<Event>18     pub fn get_io_source_ref(&self) -> &IoSource<Event> {
19         &self.io_source
20     }
21 }
22 
23 impl IntoAsync for Event {}
24