Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
google
GitHub Repository: google/crosvm
Path: blob/main/cros_async/src/event.rs
5392 views
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
pub fn get_io_source_ref(&self) -> &IoSource<Event> {
19
&self.io_source
20
}
21
}
22
23
impl IntoAsync for Event {}
24
25