pub trait SerialDevice {
// Required method
fn new(
protection_type: ProtectionType,
interrupt_evt: Event,
input: Option<Box<dyn SerialInput>>,
output: Option<Box<dyn Write + Send>>,
sync: Option<Box<dyn FileSync + Send>>,
options: SerialOptions,
keep_rds: Vec<RawDescriptor>,
) -> Self;
}Expand description
Abstraction over serial-like devices that can be created given an event and optional input and output streams.
Required Methods§
fn new( protection_type: ProtectionType, interrupt_evt: Event, input: Option<Box<dyn SerialInput>>, output: Option<Box<dyn Write + Send>>, sync: Option<Box<dyn FileSync + Send>>, options: SerialOptions, keep_rds: Vec<RawDescriptor>, ) -> Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.