Trait spectrusty_formats::scr::LoadScr
source · pub trait LoadScr: ScreenDataProvider {
fn load_scr<R: Read + Seek>(&mut self, scr: R) -> Result<()>;
fn save_scr<W: Write>(&self, dst: W) -> Result<()>;
}
Expand description
Utilities for loading and saving SCR files.
Methods of this trait are implemented automatically for types that implement ScreenDataProvider.
Required Methods§
sourcefn load_scr<R: Read + Seek>(&mut self, scr: R) -> Result<()>
fn load_scr<R: Read + Seek>(&mut self, scr: R) -> Result<()>
Attempts to read the SCR
file from the src
and load it into the underlying implementation.
Errors
This function will return an error if a file is not recognized as an SCR
file
or the requested screen mode exceeds the capacity of the underlying implementation.
Other errors may also be returned from attempts to read the file.