pub struct Overlap {
pub source_id: String,
pub target_id: String,
pub edge_type: String,
pub valid_from: String,
pub valid_to: String,
pub existing_from: String,
pub existing_to: String,
pub within_batch: bool,
}Expand description
The two intervals of a DbError::OverlappingInterval, boxed out of the
error enum (D-075).
Both are reported because neither alone identifies the conflict: the caller knows what they asserted and not what it collided with, and a message naming only the other interval reads as though the assertion were the innocent one.
Fields§
§source_id: String§target_id: String§edge_type: String§valid_from: StringThe interval the caller asserted.
valid_to: String§existing_from: StringThe interval it collides with — see Overlap::within_batch for where
that one is, because it is not always in the database.
existing_to: String§within_batch: boolWhether the collision is with another edge in the same call (0.13.7, D-180).
Two guards raise this one error. reject_overlapping_interval compares
the assertion against committed rows; reject_overlaps_within compares
a batch against itself, before the transaction opens, and nothing it
names is in the database — the batch is refused whole, so nothing it
names ever will be. A caller told an edge “already holds” an interval
goes looking for a row that is not there.
Implementations§
Trait Implementations§
impl Eq for Overlap
impl StructuralPartialEq for Overlap
Auto Trait Implementations§
impl Freeze for Overlap
impl RefUnwindSafe for Overlap
impl Send for Overlap
impl Sync for Overlap
impl Unpin for Overlap
impl UnsafeUnpin for Overlap
impl UnwindSafe for Overlap
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request