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§
Sourcefn write_bytes(bytes: &[u8])
fn write_bytes(bytes: &[u8])
Writes given bytes to the console.
Sourcefn read_bytes(bytes: &mut [u8]) -> usize
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.