pub struct Trajectory {
pub id: String,
pub agent_id: String,
pub start_time: DateTime<Utc>,
pub end_time: Option<DateTime<Utc>>,
pub observations: Vec<Observation>,
pub actions: Vec<Action>,
pub outcomes: Vec<f64>,
pub metadata: Value,
}Expand description
Complete agent trajectory
Fields§
§id: StringTrajectory ID
agent_id: StringAgent ID
start_time: DateTime<Utc>Start timestamp
end_time: Option<DateTime<Utc>>End timestamp
observations: Vec<Observation>Observations
actions: Vec<Action>Actions taken
outcomes: Vec<f64>Actual outcomes
metadata: ValueMetadata
Implementations§
Source§impl Trajectory
impl Trajectory
Sourcepub fn add_action(
&mut self,
action_type: String,
parameters: Value,
predicted_outcome: Option<f64>,
)
pub fn add_action( &mut self, action_type: String, parameters: Value, predicted_outcome: Option<f64>, )
Add action
Sourcepub fn add_outcome(&mut self, outcome: f64)
pub fn add_outcome(&mut self, outcome: f64)
Add outcome
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if trajectory is complete
Trait Implementations§
Source§impl Clone for Trajectory
impl Clone for Trajectory
Source§fn clone(&self) -> Trajectory
fn clone(&self) -> Trajectory
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 Trajectory
impl Debug for Trajectory
Source§impl<'de> Deserialize<'de> for Trajectory
impl<'de> Deserialize<'de> for Trajectory
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 Trajectory
impl RefUnwindSafe for Trajectory
impl Send for Trajectory
impl Sync for Trajectory
impl Unpin for Trajectory
impl UnwindSafe for Trajectory
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