pub enum SchemaChange {
PredicateAdded {
name: String,
arity: usize,
},
PredicateRemoved {
name: String,
arity: usize,
},
PredicateArityChanged {
name: String,
old_arity: usize,
new_arity: usize,
},
DomainAdded {
name: String,
},
DomainRemoved {
name: String,
},
RuleAdded {
name: String,
},
RuleRemoved {
name: String,
},
PredicateRenamed {
old_name: String,
new_name: String,
},
}Expand description
A single structural change detected between two schema versions.
Variants§
PredicateAdded
A predicate was added in the new schema.
PredicateRemoved
A predicate was removed from the old schema.
PredicateArityChanged
A predicate exists in both versions but with a different arity.
DomainAdded
A domain was added in the new schema.
DomainRemoved
A domain was removed from the old schema.
RuleAdded
A variable binding (rule entry) was added in the new schema.
RuleRemoved
A variable binding (rule entry) was removed from the old schema.
PredicateRenamed
A predicate was renamed (same arity, high name similarity).
Implementations§
Source§impl SchemaChange
impl SchemaChange
Sourcepub fn is_breaking(&self) -> bool
pub fn is_breaking(&self) -> bool
Returns true when this change is considered breaking:
removals and arity changes break existing consumers.
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Human-readable description of the change.
Trait Implementations§
Source§impl Clone for SchemaChange
impl Clone for SchemaChange
Source§fn clone(&self) -> SchemaChange
fn clone(&self) -> SchemaChange
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 SchemaChange
impl Debug for SchemaChange
Source§impl PartialEq for SchemaChange
impl PartialEq for SchemaChange
impl StructuralPartialEq for SchemaChange
Auto Trait Implementations§
impl Freeze for SchemaChange
impl RefUnwindSafe for SchemaChange
impl Send for SchemaChange
impl Sync for SchemaChange
impl Unpin for SchemaChange
impl UnsafeUnpin for SchemaChange
impl UnwindSafe for SchemaChange
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