pub struct Program {
pub rules: Vec<Rule>,
}Expand description
Represents a complete Datalog program
Fields§
§rules: Vec<Rule>Implementations§
Source§impl Program
impl Program
Sourcepub fn idbs(&self) -> Vec<String>
pub fn idbs(&self) -> Vec<String>
Returns all IDB relations (those that appear as heads of rules)
Sourcepub fn edbs(&self) -> Vec<String>
pub fn edbs(&self) -> Vec<String>
Returns all EDB relations (those that appear in bodies but never as heads)
Sourcepub fn all_relations(&self) -> Vec<String>
pub fn all_relations(&self) -> Vec<String>
Get all relation names (both EDB and IDB)
Sourcepub fn recursive_rules(&self) -> Vec<&Rule>
pub fn recursive_rules(&self) -> Vec<&Rule>
Get all recursive rules
Sourcepub fn non_recursive_rules(&self) -> Vec<&Rule>
pub fn non_recursive_rules(&self) -> Vec<&Rule>
Get all non-recursive rules
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnwindSafe for Program
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