pub struct SceneSnapshot {
pub next_grid_id: u32,
pub grids: Vec<(GridId, GridSnapshot)>,
}Expand description
Top-level scene snapshot — full state needed to reconstruct a
Scene via Scene::from_snapshot.
Grids serialised as a Vec<(GridId, GridSnapshot)> rather than
a HashMap so the wire form is independent of HashMap’s
non-deterministic iteration order — the same scene snapshot
twice in a row produces byte-identical output.
Fields§
§next_grid_id: u32Next id Scene::add_grid will hand out. Preserved across
snapshot round-trips so removed-id non-reuse holds.
grids: Vec<(GridId, GridSnapshot)>All registered grids paired with their ids.
Trait Implementations§
Source§impl Clone for SceneSnapshot
impl Clone for SceneSnapshot
Source§fn clone(&self) -> SceneSnapshot
fn clone(&self) -> SceneSnapshot
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SceneSnapshot
impl Debug for SceneSnapshot
Source§impl<'de> Deserialize<'de> for SceneSnapshot
impl<'de> Deserialize<'de> for SceneSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SceneSnapshot
impl RefUnwindSafe for SceneSnapshot
impl Send for SceneSnapshot
impl Sync for SceneSnapshot
impl Unpin for SceneSnapshot
impl UnsafeUnpin for SceneSnapshot
impl UnwindSafe for SceneSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more