pub struct SchemaSnapshot {
pub predicate_names: Vec<String>,
pub domain_names: Vec<String>,
pub rule_names: Vec<String>,
pub predicate_arities: HashMap<String, usize>,
}Expand description
A lightweight snapshot of a SymbolTable for comparison purposes.
Fields§
§predicate_names: Vec<String>Ordered list of predicate names.
domain_names: Vec<String>Ordered list of domain names.
rule_names: Vec<String>Ordered list of variable/rule names.
predicate_arities: HashMap<String, usize>Predicate name → arity mapping.
Implementations§
Source§impl SchemaSnapshot
impl SchemaSnapshot
Sourcepub fn from_symbol_table(table: &SymbolTable) -> Self
pub fn from_symbol_table(table: &SymbolTable) -> Self
Build a snapshot from a live SymbolTable.
Sourcepub fn predicate_count(&self) -> usize
pub fn predicate_count(&self) -> usize
Number of predicates in the snapshot.
Sourcepub fn domain_count(&self) -> usize
pub fn domain_count(&self) -> usize
Number of domains in the snapshot.
Trait Implementations§
Source§impl Clone for SchemaSnapshot
impl Clone for SchemaSnapshot
Source§fn clone(&self) -> SchemaSnapshot
fn clone(&self) -> SchemaSnapshot
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 moreAuto Trait Implementations§
impl Freeze for SchemaSnapshot
impl RefUnwindSafe for SchemaSnapshot
impl Send for SchemaSnapshot
impl Sync for SchemaSnapshot
impl Unpin for SchemaSnapshot
impl UnsafeUnpin for SchemaSnapshot
impl UnwindSafe for SchemaSnapshot
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