• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2024 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 std::convert::From;
6 use std::convert::TryFrom;
7 
8 use crate::rutabaga_os::AsBorrowedDescriptor;
9 use crate::rutabaga_os::OwnedDescriptor;
10 use crate::rutabaga_utils::RutabagaError;
11 use crate::rutabaga_utils::RutabagaHandle;
12 use crate::rutabaga_utils::RutabagaResult;
13 
14 pub struct Event(());
15 
16 impl Event {
new() -> RutabagaResult<Event>17     pub fn new() -> RutabagaResult<Event> {
18         Err(RutabagaError::Unsupported)
19     }
20 
signal(&mut self) -> RutabagaResult<()>21     pub fn signal(&mut self) -> RutabagaResult<()> {
22         Err(RutabagaError::Unsupported)
23     }
24 
wait(&self) -> RutabagaResult<()>25     pub fn wait(&self) -> RutabagaResult<()> {
26         Err(RutabagaError::Unsupported)
27     }
28 
try_clone(&self) -> RutabagaResult<Event>29     pub fn try_clone(&self) -> RutabagaResult<Event> {
30         Err(RutabagaError::Unsupported)
31     }
32 }
33 
34 impl TryFrom<RutabagaHandle> for Event {
35     type Error = RutabagaError;
try_from(_handle: RutabagaHandle) -> Result<Self, Self::Error>36     fn try_from(_handle: RutabagaHandle) -> Result<Self, Self::Error> {
37         Err(RutabagaError::Unsupported)
38     }
39 }
40 
41 impl From<Event> for RutabagaHandle {
from(_evt: Event) -> Self42     fn from(_evt: Event) -> Self {
43         unimplemented!()
44     }
45 }
46 
47 impl AsBorrowedDescriptor for Event {
as_borrowed_descriptor(&self) -> &OwnedDescriptor48     fn as_borrowed_descriptor(&self) -> &OwnedDescriptor {
49         unimplemented!()
50     }
51 }
52