Skip to main content

_Serial

Trait _Serial 

Source
pub trait _Serial {
    // Required methods
    fn new(port: SerialPort) -> Self;
    fn init(&self) -> Result<(), &'static str>;
    fn write(&self, string: &str);
}
Expand description

Interface for a serial port implementation.

Required Methods§

Source

fn new(port: SerialPort) -> Self

Create a new (uninitialized) serial port instance for the given COM port.

Source

fn init(&self) -> Result<(), &'static str>

Program the UART hardware and mark the port ready; Err if already initialized.

Source

fn write(&self, string: &str)

Write all bytes of string to the port, blocking until each is accepted.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§