pub struct StateSnapshotEvent<StateT: AgentState = JsonValue> {
pub base: BaseEvent,
pub snapshot: StateT,
}Expand description
Event containing a complete state snapshot.
This event is sent to provide the full current state of the agent.
The state is generic over StateT which must implement AgentState.
§Type Parameter
StateT: The type of state, defaults toJsonValuefor flexibility.
Fields§
§base: BaseEventCommon event fields (timestamp, rawEvent).
snapshot: StateTThe complete state snapshot.
Implementations§
Source§impl<StateT: AgentState> StateSnapshotEvent<StateT>
impl<StateT: AgentState> StateSnapshotEvent<StateT>
Sourcepub fn with_timestamp(self, timestamp: f64) -> Self
pub fn with_timestamp(self, timestamp: f64) -> Self
Sets the timestamp for this event.
Trait Implementations§
Source§impl<StateT: Clone + AgentState> Clone for StateSnapshotEvent<StateT>
impl<StateT: Clone + AgentState> Clone for StateSnapshotEvent<StateT>
Source§fn clone(&self) -> StateSnapshotEvent<StateT>
fn clone(&self) -> StateSnapshotEvent<StateT>
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<StateT: Debug + AgentState> Debug for StateSnapshotEvent<StateT>
impl<StateT: Debug + AgentState> Debug for StateSnapshotEvent<StateT>
Source§impl<StateT: AgentState + Default> Default for StateSnapshotEvent<StateT>
impl<StateT: AgentState + Default> Default for StateSnapshotEvent<StateT>
Source§impl<'de, StateT: AgentState> Deserialize<'de> for StateSnapshotEvent<StateT>
impl<'de, StateT: AgentState> Deserialize<'de> for StateSnapshotEvent<StateT>
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
Source§impl<StateT: PartialEq + AgentState> PartialEq for StateSnapshotEvent<StateT>
impl<StateT: PartialEq + AgentState> PartialEq for StateSnapshotEvent<StateT>
Source§impl<StateT> Serialize for StateSnapshotEvent<StateT>where
StateT: Serialize + AgentState,
impl<StateT> Serialize for StateSnapshotEvent<StateT>where
StateT: Serialize + AgentState,
impl<StateT: AgentState> StructuralPartialEq for StateSnapshotEvent<StateT>
Auto Trait Implementations§
impl<StateT> Freeze for StateSnapshotEvent<StateT>where
StateT: Freeze,
impl<StateT> RefUnwindSafe for StateSnapshotEvent<StateT>where
StateT: RefUnwindSafe,
impl<StateT> Send for StateSnapshotEvent<StateT>
impl<StateT> Sync for StateSnapshotEvent<StateT>
impl<StateT> Unpin for StateSnapshotEvent<StateT>where
StateT: Unpin,
impl<StateT> UnsafeUnpin for StateSnapshotEvent<StateT>where
StateT: UnsafeUnpin,
impl<StateT> UnwindSafe for StateSnapshotEvent<StateT>where
StateT: UnwindSafe,
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