Skip to main content
Rust4PM

LayoutOptions

Everything that steers one layout run.
Used as Input

0

functions accept this type(+37 nested)

Used as Output

0

functions return this type

Type Definition

166 nested items
struct— Everything that steers one layout run.
compaction:CompactionOptions— Cross-axis compaction. Its iteration counts are in CompactionTuning.
coords:CoordOptions— Cross-axis placement options.
branch_bands:bool— Keep each branch off the main path in a band of its own, so one branch never slides into
terminal_centering:bool— Centre a first- or last-layer terminal on the weighted median of its neighbours, so it
cycles:CycleOptions— Cycle-breaking options. See CycleStrategy.
direction:Direction— Primary flow direction of the layered layout. Default Direction::LeftRight.
variant 1:"leftright"— Layers advance left to right.
variant 2:"topbottom"— Layers advance top to bottom.
effort:Effort— How hard the engine works, as one dial over the iteration counts. Default
variant 1:"fast"— Fewer restarts and sweeps, for interactive relayout of large graphs.
variant 2:"balanced"— The Tuning counts as given.
variant 3:"thorough"— More restarts and sweeps, for a final rendering.
labels:LabelOptions— How edge labels are given room, and where in the drawing they end up.
clearance:f64— Clear space a label tries to keep from node boxes, other labels and other edges. Soft: A
limits:Limits— Input size limits.
max_dummies:Option<i64>— Largest accepted routing-waypoint count (one per layer a long edge passes), checked after
max_edges:Option<i64>— Largest accepted edge count.
max_nodes:Option<i64>— Largest accepted node count.
order:OrderOptions— Crossing-minimisation heuristic and group lane budgets.
group_lane_area_percent:u32— How much wider the order axis may get, in percent, when the group bands are stacked into
group_lane_budget_percent:u32— Crossings the lane pass may add to put each group (crate::Node::group) in a band of
routing:Routing— How edges are routed: the style, bundling, and which borders and lanes the ends use.
bundle_parallel:bool— Route parallel edges with the same endpoints as one edge, then split it into offset lanes.
lane_gap:f64— Room reserved per riser in a layer gap. A gap where k edges change height is widened to
seed:u32— Seed for the crossing minimisation's restarts and kicks. The same seed gives the same
seed_mode:SeedMode— How node positions given by the caller (crate::Node::position) steer a layout. Default
variant 1:"placement"— Seeds set the nodes' cross-axis positions, but layering and ordering run from scratch.
variant 2:"structure"— When every node has a seed, read layers and order off the seeds, so filtered views of
self_loops:SelfLoopOptions— How self-loops (source == target edges) are drawn.
gap:f64— Depth step between two loops stacked on one node, so k loops nest. Default 10, the
label_gap:f64— Clear space between the outer run of a loop and its own label box. Default 4.
size:f64— How far the innermost loop reaches beyond the node's border. Default 15, the
spacing:Spacing— Gaps and clearances, all in px.
bundle_lane_gap:f64— Clear space between the strokes of two lanes in one parallel-edge bundle. Default 8.
compound_header:f64— Extra room along a compound's top border, on top of Spacing::compound_padding, for a
compound_padding:f64— Room between a compound's border and its children's drawing, on every side
dummy_gap:f64— Between a routing track and its order-axis neighbour. Default 30, tighter than node_gap
edge_label_margin:f64— Extra layer gap beyond an edge label's own layer-axis extent, so the edge has room for
edge_label_stack_gap:f64— Clear space between two edge labels stacked in one layer gap. Default 6.
isolated_gap:f64— Padding around each cell of the grid that holds edgeless nodes, and the gap between that
isolated_max_columns:i64<uint>— Column cap for the isolated-node grid. Further nodes wrap into new rows. Default 24.
layer_gap:f64— Between layer columns, on the layer axis. Default 54.
node_gap:f64— Between two real nodes in one layer, on the order axis. Default 46.
port_gap:f64— Minimum port-to-port separation along one border. Default 18.
port_stroke_clear:f64— Clear space between the strokes of two adjacent ports, on top of half of each stroke's
reroute_node_gap:f64— Order-axis gap crate::reroute() uses instead of Spacing::node_gap. Default 46.
self_loop_gap:f64— Depth step between two self-loops stacked on one node border. Default 10, also the
stub:f64— Straight run out of a port before the first bend. Default 15.
tuning:Tuning— Iteration counts, budgets and thresholds, tuned on the fixture corpus.
wrap:WrapOptions— Wrapping a long drawing into rows to fit a viewport shape. When a wrap pays is in
viewport_aspect:f64— Width over height of the viewport the drawing is shown in. Default 0, never wrap.

Example JSON Value

{}