pub struct DependencyGraph { /* private fields */ }Expand description
Dependency graph for schema components
Implementations§
Source§impl DependencyGraph
impl DependencyGraph
pub fn new() -> Self
Sourcepub fn from_symbol_table(table: &SymbolTable) -> Self
pub fn from_symbol_table(table: &SymbolTable) -> Self
Build dependency graph from symbol table
Sourcepub fn add_predicate_dependency(
&mut self,
predicate: impl Into<String>,
domain: impl Into<String>,
)
pub fn add_predicate_dependency( &mut self, predicate: impl Into<String>, domain: impl Into<String>, )
Add a predicate dependency on a domain
Sourcepub fn add_variable_dependency(
&mut self,
variable: impl Into<String>,
domain: impl Into<String>,
)
pub fn add_variable_dependency( &mut self, variable: impl Into<String>, domain: impl Into<String>, )
Add a variable dependency on a domain
Sourcepub fn get_dependent_predicates(&self, domain: &str) -> HashSet<String>
pub fn get_dependent_predicates(&self, domain: &str) -> HashSet<String>
Get all predicates that depend on a domain
Sourcepub fn get_dependent_variables(&self, domain: &str) -> HashSet<String>
pub fn get_dependent_variables(&self, domain: &str) -> HashSet<String>
Get all variables that depend on a domain
Sourcepub fn get_predicate_dependencies(&self, predicate: &str) -> HashSet<String>
pub fn get_predicate_dependencies(&self, predicate: &str) -> HashSet<String>
Get all domains that a predicate depends on
Sourcepub fn compute_affected_components(
&self,
initial_domains: &HashSet<String>,
) -> AffectedComponents
pub fn compute_affected_components( &self, initial_domains: &HashSet<String>, ) -> AffectedComponents
Compute transitive closure of affected components
Trait Implementations§
Source§impl Clone for DependencyGraph
impl Clone for DependencyGraph
Source§fn clone(&self) -> DependencyGraph
fn clone(&self) -> DependencyGraph
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 DependencyGraph
impl Debug for DependencyGraph
Source§impl Default for DependencyGraph
impl Default for DependencyGraph
Source§fn default() -> DependencyGraph
fn default() -> DependencyGraph
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DependencyGraph
impl RefUnwindSafe for DependencyGraph
impl Send for DependencyGraph
impl Sync for DependencyGraph
impl Unpin for DependencyGraph
impl UnwindSafe for DependencyGraph
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