type Result<T> = core::result::Result<T, crate::error::IOError>;
use crate::UILock;
use crate::LinesIter;
pub mod fake_io;
pub mod dummy_io;
#[cfg(feature = "local_io")]
pub mod local_io;
#[cfg(feature = "local_io")]
pub use local_io::LocalIO;
pub trait IO {
fn run_command(&mut self,
ui: &mut UILock,
command: String,
) -> Result<()>;
fn run_read_command(&mut self,
ui: &mut UILock,
command: String,
) -> Result<String>;
fn run_write_command(&mut self,
ui: &mut UILock,
command: String,
input: LinesIter,
) -> Result<usize>;
fn run_transform_command(&mut self,
ui: &mut UILock,
command: String,
input: LinesIter,
) -> Result<String>;
fn write_file(&mut self,
path: &str,
append: bool,
data: LinesIter,
) -> Result<usize>;
fn read_file(&mut self,
path: &str,
must_exist: bool,
) -> Result<String>;
}