Trait opentitanlib::io::console::ConsoleDevice
source · 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§
sourcefn console_read(&self, _buf: &mut [u8], _timeout: Duration) -> Result<usize>
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).
sourcefn console_write(&self, _buf: &[u8]) -> Result<()>
fn console_write(&self, _buf: &[u8]) -> Result<()>
Writes console input data to the UART (used when this UART is the console device).
fn set_break(&self, _enable: bool) -> Result<()>
sourcefn supports_nonblocking_read(&self) -> Result<bool>
fn supports_nonblocking_read(&self) -> Result<bool>
Query if nonblocking mio mode is supported.
sourcefn register_nonblocking_read(
&self,
_registry: &Registry,
_token: Token
) -> Result<()>
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.
sourcefn nonblocking_help(&self) -> Result<Rc<dyn NonblockingHelp>>
fn nonblocking_help(&self) -> Result<Rc<dyn NonblockingHelp>>
Get the same single NonblockingHelp
object as from top level
Transport.nonblocking_help()
.