pub struct EntityQueryHandle<'a> { /* private fields */ }Expand description
A handle for querying entity state at different timestamps.
This handle provides the state_at() method, which is the primary
consumer API for getting entity state at any point in time.
Implementations§
Source§impl<'a> EntityQueryHandle<'a>
impl<'a> EntityQueryHandle<'a>
Sourcepub fn anchor_timestamp(&self) -> Option<Timestamp>
pub fn anchor_timestamp(&self) -> Option<Timestamp>
Returns the anchor timestamp for this entity.
Sourcepub fn state_at(&self, timestamp: Timestamp) -> ComputedState
pub fn state_at(&self, timestamp: Timestamp) -> ComputedState
Computes the entity’s state at the given timestamp.
This is the primary consumer API. It computes state by:
- Starting from the anchor state
- Applying decay forward or reversing backward
- Applying events in the time range
§Arguments
timestamp- The time at which to compute state
§Returns
The computed state, or None if the entity doesn’t exist.
Sourcepub fn trust_decision_for(
&self,
trustee: &EntityId,
timestamp: Timestamp,
context: &TrustContext,
life_domain: LifeDomain,
stakes: Option<ActionStakes>,
) -> Option<TrustDecision>
pub fn trust_decision_for( &self, trustee: &EntityId, timestamp: Timestamp, context: &TrustContext, life_domain: LifeDomain, stakes: Option<ActionStakes>, ) -> Option<TrustDecision>
Computes the trust decision for this entity (trustor) toward a trustee at a timestamp.
This wires together the trustor’s dispositional propensity at the time,
the current relationship state, the provided situational context,
and the relevant life domain for competence.
stakes optionally scales perceived risk based on consequence severity.
Sourcepub fn memories_at(&self, timestamp: Timestamp) -> Vec<MemoryEntry>
pub fn memories_at(&self, timestamp: Timestamp) -> Vec<MemoryEntry>
Returns memories that exist at the given timestamp.
A memory “exists” at a timestamp if it was formed before or at that time. This method returns all memories from the entity’s memory layers that were formed at or before the specified timestamp.
§Arguments
timestamp- The time at which to query existing memories
§Returns
A vector of cloned memory entries that exist at the timestamp. Returns an empty vector if the entity doesn’t exist.