• 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 crate::rutabaga_os::AsBorrowedDescriptor;
6 use crate::rutabaga_os::AsRawDescriptor;
7 use crate::rutabaga_os::OwnedDescriptor;
8 use crate::rutabaga_os::RawDescriptor;
9 use crate::rutabaga_utils::RutabagaError;
10 use crate::rutabaga_utils::RutabagaResult;
11 
12 pub struct ReadPipeStub(());
13 pub struct WritePipeStub(());
14 
15 pub type ReadPipe = ReadPipeStub;
16 pub type WritePipe = WritePipeStub;
17 
create_pipe() -> RutabagaResult<(ReadPipe, WritePipe)>18 pub fn create_pipe() -> RutabagaResult<(ReadPipe, WritePipe)> {
19     Err(RutabagaError::Unsupported)
20 }
21 
22 impl ReadPipe {
read(&self, _data: &mut [u8]) -> RutabagaResult<usize>23     pub fn read(&self, _data: &mut [u8]) -> RutabagaResult<usize> {
24         Err(RutabagaError::Unsupported)
25     }
26 }
27 
28 impl AsBorrowedDescriptor for ReadPipe {
as_borrowed_descriptor(&self) -> &OwnedDescriptor29     fn as_borrowed_descriptor(&self) -> &OwnedDescriptor {
30         unimplemented!()
31     }
32 }
33 
34 impl WritePipe {
new(_descriptor: RawDescriptor) -> WritePipe35     pub fn new(_descriptor: RawDescriptor) -> WritePipe {
36         unimplemented!()
37     }
38 
write(&self, _data: &[u8]) -> RutabagaResult<usize>39     pub fn write(&self, _data: &[u8]) -> RutabagaResult<usize> {
40         Err(RutabagaError::Unsupported)
41     }
42 }
43 
44 impl AsBorrowedDescriptor for WritePipe {
as_borrowed_descriptor(&self) -> &OwnedDescriptor45     fn as_borrowed_descriptor(&self) -> &OwnedDescriptor {
46         unimplemented!()
47     }
48 }
49 
50 impl AsRawDescriptor for WritePipe {
as_raw_descriptor(&self) -> RawDescriptor51     fn as_raw_descriptor(&self) -> RawDescriptor {
52         unimplemented!()
53     }
54 }
55