pub trait WorldSaveableExt: Sized {
    // Required methods
    fn snapshot<P: Pipeline>(&self) -> Snapshot;
    fn save<P: Pipeline>(&self, pipeline: P) -> Result<(), Error>;
    fn load<P: Pipeline>(&mut self, pipeline: P) -> Result<(), Error>;
}
Expand description

Extension trait that adds save-related methods to Bevy’s [World].

Required Methods§

source

fn snapshot<P: Pipeline>(&self) -> Snapshot

Captures a Snapshot from the current [World] state.

source

fn save<P: Pipeline>(&self, pipeline: P) -> Result<(), Error>

Saves the game state with the given Pipeline.

Errors
source

fn load<P: Pipeline>(&mut self, pipeline: P) -> Result<(), Error>

Loads the game state with the given Pipeline.

Errors

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl WorldSaveableExt for World

source§

fn snapshot<P: Pipeline>(&self) -> Snapshot

source§

fn save<P: Pipeline>(&self, pipeline: P) -> Result<(), Error>

source§

fn load<P: Pipeline>(&mut self, pipeline: P) -> Result<(), Error>

Implementors§