pub struct FactDependencyGraph { /* private fields */ }Expand description
The exact fact-level dependency graph used to order schema operations.
Implementations§
Source§impl FactDependencyGraph
impl FactDependencyGraph
Sourcepub fn from_declared(declared: &DeclaredSchema) -> Result<Self, Diagnostic>
pub fn from_declared(declared: &DeclaredSchema) -> Result<Self, Diagnostic>
Build the graph from a complete declared fact inventory.
Sourcepub fn from_facts<'a>(
facts: impl IntoIterator<Item = &'a SchemaFact>,
) -> Result<Self, Diagnostic>
pub fn from_facts<'a>( facts: impl IntoIterator<Item = &'a SchemaFact>, ) -> Result<Self, Diagnostic>
Build the graph from a complete fact inventory.
Sourcepub fn dependencies(&self, id: &SchemaFactId) -> Option<&BTreeSet<SchemaFactId>>
pub fn dependencies(&self, id: &SchemaFactId) -> Option<&BTreeSet<SchemaFactId>>
Return the direct prerequisites of one fact.
Sourcepub fn dependents(&self, id: &SchemaFactId) -> Option<&BTreeSet<SchemaFactId>>
pub fn dependents(&self, id: &SchemaFactId) -> Option<&BTreeSet<SchemaFactId>>
Return the direct dependents of one fact.
Sourcepub fn validate_complete(&self) -> Result<(), Diagnostic>
pub fn validate_complete(&self) -> Result<(), Diagnostic>
Reject an inventory with a dependency outside the inventory.
Trait Implementations§
Source§impl Clone for FactDependencyGraph
impl Clone for FactDependencyGraph
Source§fn clone(&self) -> FactDependencyGraph
fn clone(&self) -> FactDependencyGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FactDependencyGraph
impl Debug for FactDependencyGraph
impl Eq for FactDependencyGraph
Source§impl PartialEq for FactDependencyGraph
impl PartialEq for FactDependencyGraph
impl StructuralPartialEq for FactDependencyGraph
Auto Trait Implementations§
impl Freeze for FactDependencyGraph
impl RefUnwindSafe for FactDependencyGraph
impl Send for FactDependencyGraph
impl Sync for FactDependencyGraph
impl Unpin for FactDependencyGraph
impl UnsafeUnpin for FactDependencyGraph
impl UnwindSafe for FactDependencyGraph
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