pub trait ConsoleDevice {
    // Provided methods
    fn console_read(&self, _buf: &mut [u8], _timeout: Duration) -> Result<usize> { ... }
    fn console_write(&self, _buf: &[u8]) -> Result<()> { ... }
    fn set_break(&self, _enable: bool) -> Result<()> { ... }
    fn supports_nonblocking_read(&self) -> Result<bool> { ... }
    fn register_nonblocking_read(
        &self,
        _registry: &Registry,
        _token: Token
    ) -> Result<()> { ... }
    fn nonblocking_help(&self) -> Result<Rc<dyn NonblockingHelp>> { ... }
}

Provided Methods§

source

fn console_read(&self, _buf: &mut [u8], _timeout: Duration) -> Result<usize>

Reads data from the UART to print to the console (used when this UART is the console device).

source

fn console_write(&self, _buf: &[u8]) -> Result<()>

Writes console input data to the UART (used when this UART is the console device).

source

fn set_break(&self, _enable: bool) -> Result<()>

source

fn supports_nonblocking_read(&self) -> Result<bool>

Query if nonblocking mio mode is supported.

source

fn register_nonblocking_read( &self, _registry: &Registry, _token: Token ) -> Result<()>

Switch this Uart instance into nonblocking mio mode. Going forward, read() should only be called after mio::poll() has indicated that the given Token is ready.

source

fn nonblocking_help(&self) -> Result<Rc<dyn NonblockingHelp>>

Get the same single NonblockingHelp object as from top level Transport.nonblocking_help().

Implementors§