pub struct ConflictResolver { /* private fields */ }Expand description
Conflict resolver for cardinality-1 predicate groups.
Implementations§
Source§impl ConflictResolver
impl ConflictResolver
Sourcepub fn new(
strategy: ConflictStrategy,
timeout_ms: u64,
llm_budget_per_turn: usize,
retain_alternatives: bool,
) -> Self
pub fn new( strategy: ConflictStrategy, timeout_ms: u64, llm_budget_per_turn: usize, retain_alternatives: bool, ) -> Self
Create a new resolver.
strategy: resolution strategytimeout_ms: LLM resolver hard timeout in milliseconds (mandatory 500 ms per spec)llm_budget_per_turn: max LLM calls per agent turn before falling back to recencyretain_alternatives: whentrue, losing edges are returned inConflictResult::alternatives
Sourcepub fn with_llm_provider(self, provider: AnyProvider) -> Self
pub fn with_llm_provider(self, provider: AnyProvider) -> Self
Attach an LLM provider for strategy = Llm conflict resolution.
Sourcepub fn reset_turn_budget(&self, budget: usize)
pub fn reset_turn_budget(&self, budget: usize)
Reset the per-turn LLM budget. Call at the start of each agent turn.
Sourcepub async fn resolve(
&self,
candidates: Vec<Edge>,
metrics: &ApexMetrics,
) -> Result<ConflictResult, MemoryError>
pub async fn resolve( &self, candidates: Vec<Edge>, metrics: &ApexMetrics, ) -> Result<ConflictResult, MemoryError>
Resolve a group of head edges that share the same cardinality-1 predicate.
candidates must be non-empty and all share (source_entity_id, canonical_relation).
§Errors
Returns an error only on internal logic failures (empty candidate list).
Auto Trait Implementations§
impl !Freeze for ConflictResolver
impl !RefUnwindSafe for ConflictResolver
impl Send for ConflictResolver
impl Sync for ConflictResolver
impl Unpin for ConflictResolver
impl UnsafeUnpin for ConflictResolver
impl !UnwindSafe for ConflictResolver
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
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request