use std::path::Path;
use crate::string_file::{StringFile, StringFileSet};
#[derive(Debug, Clone)]
pub struct RawEspData {
pub bytes: Vec<u8>,
}
pub trait EspReader {
fn read(&self, path: &Path) -> Result<RawEspData, Box<dyn std::error::Error>>;
}
pub trait EspWriter {
fn write(&self, data: &RawEspData, path: &Path) -> Result<(), Box<dyn std::error::Error>>;
}
pub trait StringFileReader {
fn read(&self, path: &Path) -> Result<StringFile, Box<dyn std::error::Error>>;
}
pub trait StringFileWriter {
fn write(&self, file: &StringFile, path: &Path) -> Result<(), Box<dyn std::error::Error>>;
}
pub trait StringFileSetReader {
fn read_set(
&self,
dir: &Path,
plugin_name: &str,
language: &str,
) -> Result<StringFileSet, Box<dyn std::error::Error>>;
}