Skip to main content

Stores

Trait Stores 

Source
pub trait Stores: Send + 'static {
    type Snapshot: Send + 'static;

    // Required methods
    fn bind(&mut self, scene: SceneId, owner: Owner);
    fn boundary(&mut self, owner: Owner);
    fn release(&mut self, entity: Entity, owner: Owner);
    fn snapshot(&self) -> Self::Snapshot;
    fn restore(&mut self, from: &Self::Snapshot, scene: SceneId, owner: Owner);
}
Expand description

The application’s storage contract; only Session calls its lifetime hooks.

Required Associated Types§

Source

type Snapshot: Send + 'static

Required Methods§

Source

fn bind(&mut self, scene: SceneId, owner: Owner)

Source

fn boundary(&mut self, owner: Owner)

Source

fn release(&mut self, entity: Entity, owner: Owner)

Source

fn snapshot(&self) -> Self::Snapshot

Source

fn restore(&mut self, from: &Self::Snapshot, scene: SceneId, owner: Owner)

Implementors§