pub enum MergeAssertion {
EntityLive {
entity: Uuid,
},
EntityLineageReaches {
entity: Uuid,
canonical: Uuid,
},
NoteEdgeTo {
note: Uuid,
relation: EdgeRelation,
target: Uuid,
},
NoteEdgeTargetsWithin {
note: Uuid,
relation: EdgeRelation,
target_kind: String,
allowed: Uuid,
},
}Expand description
A fact the caller relied on when it planned the merge, re-checked inside the merge transaction. The first one that does not hold refuses the merge.
Variants§
EntityLive
The entity exists in the caller’s namespace, is not deleted and was not merged away.
EntityLineageReaches
canonical is live in the caller’s namespace (see
MergeAssertion::EntityLive), and either entity equals canonical or
the walk that starts at entity and follows, in the caller’s namespace,
the record each merged-away entity keeps of the entity it was merged into
arrives at canonical within 64 steps. A missing record, a deleted entity
with no such record, or a cycle ends the walk without holding. A
canonical that was itself merged away or deleted never holds, even when
the walk passes through it.
NoteEdgeTo
A live relation edge from note to target exists in the caller’s
namespace, with its target in this store.
NoteEdgeTargetsWithin
allowed is a live entity of kind target_kind in the caller’s namespace,
and every live relation edge stored under the caller’s namespace whose
source is note and whose target is a live entity of kind target_kind
in the caller’s namespace targets allowed. Only the caller’s
namespace’s edge rows and entities are read: an edge row stored under
another namespace, and an edge to any other target (a note, an event, an
edge, a deleted entity, an entity of another kind, anything in another
namespace or another store, or no record) does not count, so the outcome
depends on no record outside the caller’s namespace.
Trait Implementations§
Source§impl Clone for MergeAssertion
impl Clone for MergeAssertion
Source§impl Debug for MergeAssertion
impl Debug for MergeAssertion
impl Eq for MergeAssertion
Source§impl PartialEq for MergeAssertion
impl PartialEq for MergeAssertion
impl StructuralPartialEq for MergeAssertion
Auto Trait Implementations§
impl Freeze for MergeAssertion
impl RefUnwindSafe for MergeAssertion
impl Send for MergeAssertion
impl Sync for MergeAssertion
impl Unpin for MergeAssertion
impl UnsafeUnpin for MergeAssertion
impl UnwindSafe for MergeAssertion
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§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<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> ⓘ
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> ⓘ
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