pub struct ConflictResolver;Expand description
Resolves conflicts and persists them to the graph_conflicts table.
Implementations§
Source§impl ConflictResolver
impl ConflictResolver
Sourcepub fn resolve(
conn: &Connection,
conflict_id: i64,
strategy: ResolutionStrategy,
) -> Result<ResolutionResult>
pub fn resolve( conn: &Connection, conflict_id: i64, strategy: ResolutionStrategy, ) -> Result<ResolutionResult>
Resolve a saved conflict by its ID using the given strategy.
Sourcepub fn save_conflict(conn: &Connection, conflict: &Conflict) -> Result<i64>
pub fn save_conflict(conn: &Connection, conflict: &Conflict) -> Result<i64>
Persist a detected conflict to the graph_conflicts table.
Returns the generated row ID.
Sourcepub fn list_conflicts(
conn: &Connection,
resolved: Option<bool>,
) -> Result<Vec<Conflict>>
pub fn list_conflicts( conn: &Connection, resolved: Option<bool>, ) -> Result<Vec<Conflict>>
List conflicts from the graph_conflicts table.
resolved = Some(true)— only resolved conflicts.resolved = Some(false)— only unresolved conflicts.resolved = None— all conflicts.
Sourcepub fn get_conflict(conn: &Connection, id: i64) -> Result<Option<Conflict>>
pub fn get_conflict(conn: &Connection, id: i64) -> Result<Option<Conflict>>
Retrieve a single conflict by ID.
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 moreCreates a shared type from an unshared type.