pub struct OptimisticConflict {
pub resource_id: String,
pub conflicting_agent: String,
pub expected_version: u64,
pub actual_version: u64,
pub holder_agent: String,
pub detected_at: Instant,
}Expand description
Describes a conflict between two operations
Fields§
§resource_id: StringResource that had the conflict
conflicting_agent: StringAgent that tried to commit
expected_version: u64Version the agent expected
actual_version: u64Current version when commit was attempted
holder_agent: StringAgent that made the conflicting change
detected_at: InstantWhen the conflict was detected
Implementations§
Source§impl OptimisticConflict
impl OptimisticConflict
Sourcepub fn version_diff(&self) -> u64
pub fn version_diff(&self) -> u64
Get the version difference
Trait Implementations§
Source§impl Clone for OptimisticConflict
impl Clone for OptimisticConflict
Source§fn clone(&self) -> OptimisticConflict
fn clone(&self) -> OptimisticConflict
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OptimisticConflict
impl RefUnwindSafe for OptimisticConflict
impl Send for OptimisticConflict
impl Sync for OptimisticConflict
impl Unpin for OptimisticConflict
impl UnsafeUnpin for OptimisticConflict
impl UnwindSafe for OptimisticConflict
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