pub struct SchemaDelta {
pub added_labels: Vec<(String, LabelMeta)>,
pub added_edge_types: Vec<(String, EdgeTypeMeta)>,
pub added_properties: Vec<PropertyAddition>,
}Expand description
Schema additions on top of primary, owned by a single fork.
Only additions — renames, drops, and type changes are spec
non-goals (§14). Always read together with primary’s schema:
merged = primary ⊕ delta. The merge implementation lives in
crate::core::schema::SchemaManager::with_overlay.
Fields§
§added_labels: Vec<(String, LabelMeta)>Vertex labels new to this fork’s schema.
added_edge_types: Vec<(String, EdgeTypeMeta)>Edge types new to this fork’s schema.
added_properties: Vec<PropertyAddition>Properties added to existing labels or edge types.
Implementations§
Source§impl SchemaDelta
impl SchemaDelta
Sourcepub fn merge_atop(&self, base: &SchemaDelta) -> SchemaDelta
pub fn merge_atop(&self, base: &SchemaDelta) -> SchemaDelta
Compose self atop base: returns base ⊕ self.
Phase 3 (nested forks): the effective schema for a child fork is
primary ⊕ parent_overlay ⊕ child_overlay. This helper folds the
chain bottom-up so the final result can be merged into primary
in a single crate::core::schema::SchemaManager::with_overlay
call.
Collision policy: self wins. A child fork that re-declares the
same label or edge type as its parent overrides the parent’s
entry. Property additions are deduplicated by (owner, property),
with self’s entry winning.
Trait Implementations§
Source§impl Clone for SchemaDelta
impl Clone for SchemaDelta
Source§fn clone(&self) -> SchemaDelta
fn clone(&self) -> SchemaDelta
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SchemaDelta
impl Debug for SchemaDelta
Source§impl Default for SchemaDelta
impl Default for SchemaDelta
Source§fn default() -> SchemaDelta
fn default() -> SchemaDelta
Source§impl<'de> Deserialize<'de> for SchemaDelta
impl<'de> Deserialize<'de> for SchemaDelta
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SchemaDelta
impl RefUnwindSafe for SchemaDelta
impl Send for SchemaDelta
impl Sync for SchemaDelta
impl Unpin for SchemaDelta
impl UnsafeUnpin for SchemaDelta
impl UnwindSafe for SchemaDelta
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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