use std::io;
use crossterm_utils::Result;
#[cfg(unix)]
pub use self::unix::{AsyncReader, SyncReader};
#[cfg(windows)]
pub use self::windows::{AsyncReader, SyncReader};
#[cfg(unix)]
pub(crate) mod unix;
#[cfg(windows)]
pub(crate) mod windows;
pub(crate) trait Input {
fn read_line(&self) -> Result<String> {
let mut rv = String::new();
io::stdin().read_line(&mut rv)?;
let len = rv.trim_end_matches(&['\r', '\n'][..]).len();
rv.truncate(len);
Ok(rv)
}
fn read_char(&self) -> Result<char>;
fn read_async(&self) -> AsyncReader;
fn read_until_async(&self, delimiter: u8) -> AsyncReader;
fn read_sync(&self) -> SyncReader;
fn enable_mouse_mode(&self) -> Result<()>;
fn disable_mouse_mode(&self) -> Result<()>;
}