devices/serial/sys/
linux.rs1use std::io;
6
7use base::Event;
8use base::FileSync;
9use base::RawDescriptor;
10use hypervisor::ProtectionType;
11
12use crate::serial_device::SerialInput;
13use crate::serial_device::SerialOptions;
14use crate::sys::serial_device::SerialDevice;
15use crate::Serial;
16
17pub(crate) type InStreamType = Box<dyn SerialInput>;
20
21impl SerialDevice for Serial {
22 fn new(
26 _protection_type: ProtectionType,
27 interrupt_evt: Event,
28 input: Option<Box<dyn SerialInput>>,
29 out: Option<Box<dyn io::Write + Send>>,
30 _sync: Option<Box<dyn FileSync + Send>>,
31 options: SerialOptions,
32 _keep_rds: Vec<RawDescriptor>,
33 ) -> Serial {
34 Serial::new_common(interrupt_evt, input, out, options.out_timestamp)
35 }
36}