use std::fmt::{Debug, Display};
pub trait KaonFile: KaonRead + KaonWrite + Display + Debug {
fn path(&self) -> Result<String, String> {
Err("cannot write to specified file type".to_string())
}
}
pub trait KaonRead {
fn read_line(&self) -> Result<Option<String>, String> {
Err("cannot write to specified file type".to_string())
}
fn read_to_string(&self) -> Result<String, String> {
Err("cannot write to specified file type".to_string())
}
}
pub trait KaonWrite {
fn write(&self, _bytes: &[u8]) -> Result<(), String> {
Err("cannot write to specified file type".to_string())
}
fn writeln(&self, _line: &str) -> Result<(), String> {
Err("cannot write to specified file type".to_string())
}
fn flush(&self) -> Result<(), String> {
Err("cannot write to specified file type".to_string())
}
}