pub struct VersionConflict {
pub id: Uuid,
pub expected_version: i64,
pub current_version: i64,
pub display_id: String,
}Expand description
Error type for version conflicts during optimistic locking
Fields§
§id: UuidID of the conflicting record
expected_version: i64The version the client expected
current_version: i64The current version in the database
display_id: StringHuman-readable identifier (spec_id or name)
Trait Implementations§
Source§impl Clone for VersionConflict
impl Clone for VersionConflict
Source§fn clone(&self) -> VersionConflict
fn clone(&self) -> VersionConflict
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VersionConflict
impl Debug for VersionConflict
Source§impl Display for VersionConflict
impl Display for VersionConflict
Source§impl Error for VersionConflict
impl Error for VersionConflict
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for VersionConflict
impl RefUnwindSafe for VersionConflict
impl Send for VersionConflict
impl Sync for VersionConflict
impl Unpin for VersionConflict
impl UnsafeUnpin for VersionConflict
impl UnwindSafe for VersionConflict
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