pub trait CharIo {
type Error;
// Required methods
fn get_char(&mut self) -> Result<Option<char>, Self::Error>;
fn put_char(&mut self, c: char) -> Result<(), Self::Error>;
// Provided method
fn write_str(&mut self, s: &str) -> Result<(), Self::Error> { ... }
}Expand description
Platform-agnostic character I/O trait. Implementations provide non-blocking character I/O with platform-specific buffering.