Fix simulation reaching different states when started from different snaphots.
This commit is contained in:
14
src/data/maybe_serializable_data.rs
Normal file
14
src/data/maybe_serializable_data.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use downcast_rs::{impl_downcast, DowncastSync};
|
||||
#[cfg(feature = "serde-serialize")]
|
||||
use erased_serde::Serialize;
|
||||
|
||||
/// Piece of data that may be serializable.
|
||||
pub trait MaybeSerializableData: DowncastSync {
|
||||
/// Convert this shape as a serializable entity.
|
||||
#[cfg(feature = "serde-serialize")]
|
||||
fn as_serialize(&self) -> Option<(u32, &dyn Serialize)> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
impl_downcast!(sync MaybeSerializableData);
|
||||
Reference in New Issue
Block a user