pub struct DataflowGraph<N, E, L, C> { /* private fields */ }Expand description
Immutable, canonically ordered, content-identified dataflow structure.
The generic parameters represent graph identities, locations, and edge classes only. Adapters may project machine code, syntax trees, or other located artifacts into these neutral values without storing their source types in the graph.
Implementations§
Source§impl<N, E, L, C> DataflowGraph<N, E, L, C>
impl<N, E, L, C> DataflowGraph<N, E, L, C>
Sourcepub fn build(
nodes: impl IntoIterator<Item = NodeSpec<N, L>>,
edges: impl IntoIterator<Item = EdgeSpec<E, N, C>>,
) -> Result<Self, GraphBuildError<N, E>>
pub fn build( nodes: impl IntoIterator<Item = NodeSpec<N, L>>, edges: impl IntoIterator<Item = EdgeSpec<E, N, C>>, ) -> Result<Self, GraphBuildError<N, E>>
Validates and freezes graph declarations in canonical identity order.
Sourcepub fn nodes(&self) -> impl ExactSizeIterator<Item = &Node<N, L>>
pub fn nodes(&self) -> impl ExactSizeIterator<Item = &Node<N, L>>
Iterates nodes in stable identity order.
Sourcepub fn edges(&self) -> impl ExactSizeIterator<Item = &Edge<E, N, C>>
pub fn edges(&self) -> impl ExactSizeIterator<Item = &Edge<E, N, C>>
Iterates edges in stable identity order.
Sourcepub fn predecessors(&self, node: &N) -> Option<&[E]>
pub fn predecessors(&self, node: &N) -> Option<&[E]>
Returns incoming edge identities in stable order.
Sourcepub fn successors(&self, node: &N) -> Option<&[E]>
pub fn successors(&self, node: &N) -> Option<&[E]>
Returns outgoing edge identities in stable order.
Sourcepub fn fingerprint(&self) -> ValueFingerprint
pub fn fingerprint(&self) -> ValueFingerprint
Returns the canonical content fingerprint.
Trait Implementations§
Source§impl<N: Clone, E: Clone, L: Clone, C: Clone> Clone for DataflowGraph<N, E, L, C>
impl<N: Clone, E: Clone, L: Clone, C: Clone> Clone for DataflowGraph<N, E, L, C>
Source§fn clone(&self) -> DataflowGraph<N, E, L, C>
fn clone(&self) -> DataflowGraph<N, E, L, C>
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 moreimpl<N: Eq, E: Eq, L: Eq, C: Eq> Eq for DataflowGraph<N, E, L, C>
Source§impl<N: PartialEq, E: PartialEq, L: PartialEq, C: PartialEq> PartialEq for DataflowGraph<N, E, L, C>
impl<N: PartialEq, E: PartialEq, L: PartialEq, C: PartialEq> PartialEq for DataflowGraph<N, E, L, C>
impl<N: PartialEq, E: PartialEq, L: PartialEq, C: PartialEq> StructuralPartialEq for DataflowGraph<N, E, L, C>
Auto Trait Implementations§
impl<N, E, L, C> Freeze for DataflowGraph<N, E, L, C>
impl<N, E, L, C> RefUnwindSafe for DataflowGraph<N, E, L, C>
impl<N, E, L, C> Send for DataflowGraph<N, E, L, C>
impl<N, E, L, C> Sync for DataflowGraph<N, E, L, C>
impl<N, E, L, C> Unpin for DataflowGraph<N, E, L, C>
impl<N, E, L, C> UnsafeUnpin for DataflowGraph<N, E, L, C>
impl<N, E, L, C> UnwindSafe for DataflowGraph<N, E, L, C>
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