pub struct ConflictDetector;Expand description
Detects conflicts in the cross_references graph.
Implementations§
Source§impl ConflictDetector
impl ConflictDetector
Sourcepub fn detect_all(conn: &Connection) -> Result<Vec<Conflict>>
pub fn detect_all(conn: &Connection) -> Result<Vec<Conflict>>
Run all detectors and return a combined, deduplicated list of conflicts.
Sourcepub fn detect_contradictions(conn: &Connection) -> Result<Vec<Conflict>>
pub fn detect_contradictions(conn: &Connection) -> Result<Vec<Conflict>>
Find edges where A→B has contradicting relation types (e.g. both “supports” and “contradicts” for the same pair).
Sourcepub fn detect_temporal_inconsistencies(
conn: &Connection,
) -> Result<Vec<Conflict>>
pub fn detect_temporal_inconsistencies( conn: &Connection, ) -> Result<Vec<Conflict>>
Find edges with overlapping validity periods for the same entity pair.
Queries the cross_references table and treats the created_at column
as a proxy for validity start. If two edges share the same
(from_id, to_id, relation_type) triple, that is considered a temporal
inconsistency — one should have been closed when the next was created.
Sourcepub fn detect_cycles(conn: &Connection) -> Result<Vec<Conflict>>
pub fn detect_cycles(conn: &Connection) -> Result<Vec<Conflict>>
Detect cycles in the directed edge graph using iterative DFS.
Returns one conflict per cycle found, listing the edge IDs that form that cycle.
Sourcepub fn detect_orphans(conn: &Connection) -> Result<Vec<Conflict>>
pub fn detect_orphans(conn: &Connection) -> Result<Vec<Conflict>>
Find edges whose from_id or to_id do not exist in the memories
table.
Auto Trait Implementations§
impl Freeze for ConflictDetector
impl RefUnwindSafe for ConflictDetector
impl Send for ConflictDetector
impl Sync for ConflictDetector
impl Unpin for ConflictDetector
impl UnsafeUnpin for ConflictDetector
impl UnwindSafe for ConflictDetector
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more