FlowGraphLayout

Trait FlowGraphLayout 

Source
pub trait FlowGraphLayout:
    Sized
    + Sync
    + Send
    + 'static {
    // Required method
    fn layout(&self, graph: &FlowGraph, nodes: &[FlowGraphNode]) -> bool;
}
Expand description

The interface responsible for laying out a FlowGraph.

Required Methods§

Source

fn layout(&self, graph: &FlowGraph, nodes: &[FlowGraphNode]) -> bool

Perform the flow graph layout, returning true if successful.

The implementation is responsible for doing four main things (usually in this order):

  1. Adjusting nodes positions using FlowGraphNode::set_position.
  2. Setting the edge points (e.g. the lines between nodes) using FlowGraphNode::set_outgoing_edge_points.
  3. Setting the nodes visibility region using FlowGraphNode::set_visibility_region.
  4. Setting the size of the graph using FlowGraph::set_size.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§