pub struct IdConflict<Id> {
pub attempted: Id,
pub diagnostics: ConstraintDiagnostics,
}Expand description
The primary-key conflict of a create: the id is always known, from the
write’s own input (a single create) or by matching the database’s
reported key against the batch’s own ids (create_all). Unlike
ConstraintConflict, attempted is never optional here — a pkey
violation with no attributable id is Fatal(Invariant) instead, never
this variant with a guessed or missing id.
Fields§
§attempted: Id§diagnostics: ConstraintDiagnosticsTrait Implementations§
Source§impl<Id: Clone> Clone for IdConflict<Id>
impl<Id: Clone> Clone for IdConflict<Id>
Source§impl<Id: Debug> Debug for IdConflict<Id>
impl<Id: Debug> Debug for IdConflict<Id>
Source§impl<Id> Display for IdConflict<Id>
impl<Id> Display for IdConflict<Id>
Source§impl<Id: Debug> Error for IdConflict<Id>
impl<Id: Debug> Error for IdConflict<Id>
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<Id> !RefUnwindSafe for IdConflict<Id>
impl<Id> !UnwindSafe for IdConflict<Id>
impl<Id> Freeze for IdConflict<Id>where
Id: Freeze,
impl<Id> Send for IdConflict<Id>where
Id: Send,
impl<Id> Sync for IdConflict<Id>where
Id: Sync,
impl<Id> Unpin for IdConflict<Id>where
Id: Unpin,
impl<Id> UnsafeUnpin for IdConflict<Id>where
Id: UnsafeUnpin,
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 more