Skip to main content

LocatedGraphAdapter

Trait LocatedGraphAdapter 

Source
pub trait LocatedGraphAdapter {
    type NodeId: Clone + Hash + Ord;
    type EdgeId: Clone + Hash + Ord;
    type Location: Hash + Ord;
    type Class: Hash + Ord;

    // Required methods
    fn nodes(&self) -> Vec<NodeSpec<Self::NodeId, Self::Location>>;
    fn edges(&self) -> Vec<EdgeSpec<Self::EdgeId, Self::NodeId, Self::Class>>;

    // Provided method
    fn build_graph(&self) -> AdapterBuildResult<Self> { ... }
}
Expand description

Projects an external located representation into neutral graph declarations.

Implement this trait on a small adapter that borrows an external located-code object. Only the returned identities, locations, classes, and directions are retained by DataflowGraph.

Required Associated Types§

Source

type NodeId: Clone + Hash + Ord

Stable node identity.

Source

type EdgeId: Clone + Hash + Ord

Stable edge identity.

Source

type Location: Hash + Ord

Neutral location value.

Source

type Class: Hash + Ord

Consumer edge-class extension.

Required Methods§

Source

fn nodes(&self) -> Vec<NodeSpec<Self::NodeId, Self::Location>>

Produces located node declarations.

Source

fn edges(&self) -> Vec<EdgeSpec<Self::EdgeId, Self::NodeId, Self::Class>>

Produces directed edge declarations.

Provided Methods§

Source

fn build_graph(&self) -> AdapterBuildResult<Self>

Validates and freezes the projected graph.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§