pub trait TextDevice {
// Required method
fn write_bytes(&mut self, data: &[u8], ctx: &mut Context<'_>) -> usize;
}Expand description
The abstract text-output device. Users of the terminal call
write_bytes directly.
§Turbo Vision heritage
Ports TTextDevice (textview.cpp); the C++ stream layer is replaced by
this single write method.
Required Methods§
Sourcefn write_bytes(&mut self, data: &[u8], ctx: &mut Context<'_>) -> usize
fn write_bytes(&mut self, data: &[u8], ctx: &mut Context<'_>) -> usize
Write data bytes into the device and return the number of bytes accepted
(always data.len() for Terminal).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".