pub trait Terminal {
// Required methods
fn write(&mut self, bytes: &[u8]) -> Result<()>;
fn read(
&mut self,
buf: &mut [u8],
timeout: Option<Duration>,
) -> Result<Option<usize>>;
// Provided methods
fn restore(&mut self) -> Result<()> { ... }
fn modes(&mut self, _paste: bool, _kitty: bool) { ... }
}Expand description
A byte stream to a terminal with a timed read.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".