pub struct Conflict {Show 13 fields
pub conflict_id: ConflictId,
pub conflict_type: ConflictType,
pub item_a_type: EntityType,
pub item_a_id: Uuid,
pub item_b_type: EntityType,
pub item_b_id: Uuid,
pub agent_a_id: Option<AgentId>,
pub agent_b_id: Option<AgentId>,
pub trajectory_id: Option<TrajectoryId>,
pub status: ConflictStatus,
pub resolution: Option<ConflictResolutionRecord>,
pub detected_at: Timestamp,
pub resolved_at: Option<Timestamp>,
}Expand description
A conflict between memory items.
Fields§
§conflict_id: ConflictId§conflict_type: ConflictType§item_a_type: EntityType§item_a_id: Uuid§item_b_type: EntityType§item_b_id: Uuid§agent_a_id: Option<AgentId>§agent_b_id: Option<AgentId>§trajectory_id: Option<TrajectoryId>§status: ConflictStatus§resolution: Option<ConflictResolutionRecord>§detected_at: Timestamp§resolved_at: Option<Timestamp>Implementations§
Source§impl Conflict
impl Conflict
Sourcepub fn new(
conflict_type: ConflictType,
item_a_type: EntityType,
item_a_id: Uuid,
item_b_type: EntityType,
item_b_id: Uuid,
) -> Self
pub fn new( conflict_type: ConflictType, item_a_type: EntityType, item_a_id: Uuid, item_b_type: EntityType, item_b_id: Uuid, ) -> Self
Create a new conflict.
Sourcepub fn with_agents(self, agent_a: AgentId, agent_b: AgentId) -> Self
pub fn with_agents(self, agent_a: AgentId, agent_b: AgentId) -> Self
Associate with agents.
Sourcepub fn with_trajectory(self, trajectory_id: TrajectoryId) -> Self
pub fn with_trajectory(self, trajectory_id: TrajectoryId) -> Self
Associate with trajectory.
Sourcepub fn resolve(&mut self, resolution: ConflictResolutionRecord)
pub fn resolve(&mut self, resolution: ConflictResolutionRecord)
Resolve the conflict.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Conflict
impl<'de> Deserialize<'de> for Conflict
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
impl StructuralPartialEq for Conflict
Auto Trait Implementations§
impl Freeze for Conflict
impl RefUnwindSafe for Conflict
impl Send for Conflict
impl Sync for Conflict
impl Unpin for Conflict
impl UnwindSafe for Conflict
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