blob: 93775563996e9eb45c093eb2ce59d16da2576a3a (
plain) (
tree)
|
|
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use std::io;
use std::os::unix::io::RawFd;
use sys_util::EventFd;
/// Abstraction over serial-like devices that can be created given an event and optional input and
/// output streams.
pub trait SerialDevice {
fn new(
interrupt_evt: EventFd,
input: Option<Box<dyn io::Read + Send>>,
output: Option<Box<dyn io::Write + Send>>,
keep_fds: Vec<RawFd>,
) -> Self;
}
|