Trait ConsoleIf

Source
pub trait ConsoleIf {
    // Required methods
    fn write_bytes(bytes: &[u8]);
    fn read_bytes(bytes: &mut [u8]) -> usize;
}
Expand description

Console input and output interface.

Required Methods§

Source

fn write_bytes(bytes: &[u8])

Writes given bytes to the console.

Source

fn read_bytes(bytes: &mut [u8]) -> usize

Reads bytes from the console into the given mutable slice.

Returns the number of bytes read.

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.

Implementors§