pub trait Loadable {
// Required methods
fn load(reader: impl Read, compressed: bool) -> Result<Self>
where Self: Sized;
fn modernise(&mut self);
}Required Methods§
Sourcefn load(reader: impl Read, compressed: bool) -> Result<Self>where
Self: Sized,
fn load(reader: impl Read, compressed: bool) -> Result<Self>where
Self: Sized,
Loads a schematic from the given reader.
If compressed is set, the data will be decompressed as GZIP.
Otherwise, it will be read as-is.
§Errors
Returns an error if the schematic couldn’t be loaded.
This may occur if the schematic uses unsupported features or is invalid, or when an IO error is encountered.