pub struct WorldStateSnapshot {
pub id: String,
pub timestamp: DateTime<Utc>,
pub nodes: Vec<StateNode>,
pub edges: Vec<StateEdge>,
pub layers: HashMap<StateLayer, bool>,
pub metadata: HashMap<String, Value>,
}Expand description
Complete world state snapshot at a point in time
This represents the entire state of the MockForge world at a specific moment, including all personas, entities, relationships, and system state.
Fields§
§id: StringUnique identifier for this snapshot
timestamp: DateTime<Utc>Timestamp when this snapshot was created
nodes: Vec<StateNode>All state nodes in this snapshot
edges: Vec<StateEdge>All state edges (relationships) in this snapshot
layers: HashMap<StateLayer, bool>State layers and their visibility
metadata: HashMap<String, Value>Additional metadata about this snapshot
Implementations§
Source§impl WorldStateSnapshot
impl WorldStateSnapshot
Sourcepub fn nodes_in_layer(&self, layer: &StateLayer) -> Vec<&StateNode>
pub fn nodes_in_layer(&self, layer: &StateLayer) -> Vec<&StateNode>
Get all nodes in a specific layer
Sourcepub fn edges_for_node(&self, node_id: &str) -> Vec<&StateEdge>
pub fn edges_for_node(&self, node_id: &str) -> Vec<&StateEdge>
Get all edges connected to a node
Trait Implementations§
Source§impl Clone for WorldStateSnapshot
impl Clone for WorldStateSnapshot
Source§fn clone(&self) -> WorldStateSnapshot
fn clone(&self) -> WorldStateSnapshot
Returns a duplicate of the value. Read more
1.0.0 · 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 WorldStateSnapshot
impl Debug for WorldStateSnapshot
Source§impl Default for WorldStateSnapshot
impl Default for WorldStateSnapshot
Source§impl<'de> Deserialize<'de> for WorldStateSnapshot
impl<'de> Deserialize<'de> for WorldStateSnapshot
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 WorldStateSnapshot
impl RefUnwindSafe for WorldStateSnapshot
impl Send for WorldStateSnapshot
impl Sync for WorldStateSnapshot
impl Unpin for WorldStateSnapshot
impl UnwindSafe for WorldStateSnapshot
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