Loadable

Trait Loadable 

Source
pub trait Loadable {
    // Required methods
    fn load(reader: impl Read, compressed: bool) -> Result<Self>
       where Self: Sized;
    fn modernise(&mut self);
}

Required Methods§

Source

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.

Source

fn modernise(&mut self)

Replaces old (pre-flattening) Minecraft block IDs with their modern equivalents.

Implementors§