// Copyright 2024 The ChromiumOS Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. use std::path::Path; use crate::rutabaga_os::AsBorrowedDescriptor; use crate::rutabaga_os::OwnedDescriptor; use crate::rutabaga_os::RawDescriptor; use crate::rutabaga_os::TubeType; use crate::rutabaga_utils::RutabagaError; use crate::rutabaga_utils::RutabagaResult; pub struct Stub(()); pub type Tube = Stub; pub type Listener = Stub; impl Tube { pub fn new>(_path: P, _kind: TubeType) -> RutabagaResult { Err(RutabagaError::Unsupported) } pub fn send( &self, _opaque_data: &[u8], _descriptors: &[RawDescriptor], ) -> RutabagaResult { Err(RutabagaError::Unsupported) } pub fn receive( &self, _opaque_data: &mut [u8], ) -> RutabagaResult<(usize, Vec)> { Err(RutabagaError::Unsupported) } } impl AsBorrowedDescriptor for Tube { fn as_borrowed_descriptor(&self) -> &OwnedDescriptor { unimplemented!() } } impl Listener { /// Creates a new `Listener` bound to the given path. pub fn bind>(_path: P) -> RutabagaResult { Err(RutabagaError::Unsupported) } pub fn accept(&self) -> RutabagaResult { Err(RutabagaError::Unsupported) } }