pub struct Conflict {
pub id: String,
pub memory_id: i64,
pub base: Option<SyncMemoryVersion>,
pub local: SyncMemoryVersion,
pub remote: SyncMemoryVersion,
pub conflict_type: ConflictType,
pub detected_at: DateTime<Utc>,
pub resolved: bool,
pub resolution: Option<Resolution>,
}Expand description
Represents a conflict between versions
Fields§
§id: StringUnique conflict identifier
memory_id: i64Memory ID that has conflict
base: Option<SyncMemoryVersion>The base version (common ancestor)
local: SyncMemoryVersionLocal version
remote: SyncMemoryVersionRemote version
conflict_type: ConflictTypeType of conflict
detected_at: DateTime<Utc>When the conflict was detected
resolved: boolWhether this has been resolved
resolution: Option<Resolution>Resolution if resolved
Implementations§
Source§impl Conflict
impl Conflict
Sourcepub fn new(
memory_id: i64,
base: Option<SyncMemoryVersion>,
local: SyncMemoryVersion,
remote: SyncMemoryVersion,
conflict_type: ConflictType,
) -> Self
pub fn new( memory_id: i64, base: Option<SyncMemoryVersion>, local: SyncMemoryVersion, remote: SyncMemoryVersion, conflict_type: ConflictType, ) -> Self
Create a new conflict
Sourcepub fn can_auto_resolve(&self) -> bool
pub fn can_auto_resolve(&self) -> bool
Check if auto-resolution is possible
Sourcepub fn resolve(&mut self, resolution: Resolution)
pub fn resolve(&mut self, resolution: Resolution)
Mark as resolved
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
Auto Trait Implementations§
impl Freeze for Conflict
impl RefUnwindSafe for Conflict
impl Send for Conflict
impl Sync for Conflict
impl Unpin for Conflict
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.