pub struct SaveData {
pub version: u16,
pub game_version: i32,
pub header1: Header1,
pub header2: Header2,
pub preview: Preview,
pub bricks: Vec<Brick>,
pub components: HashMap<String, Component>,
}
Expand description
An entire save file.
Represents data that can be written out with a SaveWriter
, or read with a SaveReader
.
Composed of its Header1
, Header2
, and more information.
Fields§
§version: u16
The version of the save. Only relevant for reads; this automatically uses SAVE_VERSION
when writing.
game_version: i32
The game version the save was saved on.
header1: Header1
The first header of the save.
header2: Header2
The second header of the save.
preview: Preview
The preview of the save, if any.
bricks: Vec<Brick>
The bricks in the save.
components: HashMap<String, Component>
The components in the save.
Implementations§
source§impl SaveData
impl SaveData
sourcepub fn into_octree(self) -> SaveOctree
pub fn into_octree(self) -> SaveOctree
Convert this SaveData
into a SaveOctree
for quick traversal of bricks in space.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for SaveData
impl Send for SaveData
impl Sync for SaveData
impl Unpin for SaveData
impl UnwindSafe for SaveData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more