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§
Sourcefn layout(&self, graph: &FlowGraph, nodes: &[FlowGraphNode]) -> bool
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):
- Adjusting
nodespositions usingFlowGraphNode::set_position. - Setting the edge points (e.g. the lines between nodes) using
FlowGraphNode::set_outgoing_edge_points. - Setting the
nodesvisibility region usingFlowGraphNode::set_visibility_region. - 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.