Export block Common impl methods
@@ -115,14 +115,14 @@ pub struct Input {
}
impl Input {
- fn open(&self) -> Result<impl BufRead, Error> {
+ pub fn open(&self) -> Result<impl BufRead, Error> {
io::open_file_read(&self.input_file).map_err(|source| Error::InputInvalid {
source,
path: self.input_file.clone().unwrap_or_default(),
})
}
- fn load_block(&self) -> Result<Block, Error> {
+ pub fn load_block(&self) -> Result<Block, Error> {
let reader = self.open()?;
Block::deserialize(reader).map_err(Error::BlockFileCorrupted)
}
@@ -142,7 +142,7 @@ pub struct Common {
}
impl Common {
- fn open_output(&self) -> Result<impl Write, Error> {
+ pub fn open_output(&self) -> Result<impl Write, Error> {
io::open_file_write(&self.output_file).map_err(|source| Error::OutputInvalid {
source,
path: self.output_file.clone().unwrap_or_default(),
