Skip to main content

Crate merman_layout_elk

Crate merman_layout_elk 

Source
Expand description

Optional ELK layout engine integration for merman.

Source-port policy:

  • The historical Mermaid adapter derivation is https://github.com/mermaid-js/mermaid/blob/21f72f07ea22c0af48a3149c550654e80d8e40cb/packages/mermaid/src/rendering-util/layout-algorithms/elk/render.ts.
  • The historical elkjs@0.9.3 derivation is https://github.com/kieler/elkjs/tree/a8304cf79fde75bc2ab1a89d28320f53f8637436.
  • The historical Eclipse ELK Java derivation is https://github.com/eclipse-elk/elk/tree/62d5909f96fad541bc101ad52dabaece6b7eab7e,
  • Mermaid 12.3.0’s exact engine oracle is elkjs 0.12.0 at https://github.com/kieler/elkjs/tree/ff5771d7165445c42c408bb8a090c8035272218c, compared with Eclipse ELK 0.12.0 at https://github.com/eclipse-elk/elk/tree/323312916048544e4e594eab3303cdb0d01e2929. elkjs CI clones ELK master, so this tag is not a proven unique npm build input. The engine crate’s MERMAID_12_3_DELTA.md records ported deltas and unsupported options.

The crate exposes one Mermaid adapter over the source-backed ELK providers. Additional providers handle flat graphs and recursive containers, including Mermaid’s explicit metadata presets and cross-boundary downgrade. Remaining cross-provider boundary routes are rejected explicitly. New layout behavior must carry a pinned Mermaid or Eclipse ELK source reference.

Structs§

ContainerNodeOptions
ContainerOptions
Mermaid resolves container placement independently from root placement in named presets.
Edge
EdgeLabelLayout
EdgeLayout
ElkOperationSeed
The nonzero random seed captured by the owner of one render/layout operation.
Graph
GraphExecution
HierarchySweepDebugTrace
HierarchySweepNodeDebug
Label
LayeredOptions
LayoutOptions
LayoutResult
Node
NodeLayout
NoopWorkControl
Checked no-op control used by compatibility entry points.
Point
SourcePhaseDiagnostics
A guarded diagnostic session for inspecting the source-backed layered pipeline.
Spacing
TerminalLabel

Enums§

Algorithm
Resolved ELK provider identity. Root loader names and container metadata have distinct allowlists in Mermaid; callers must resolve those before constructing the graph.
CycleBreakingStrategy
Direction
EdgeRouting
Error
HierarchyHandling
LayerConstraint
LayeredPhase
LayeringStrategy
ModelOrderStrategy
NodeKind
NodePlacementAlignment
NodePlacementStrategy
PortAlignment
ProcessorKind
SelfLoopDistributionStrategy
SelfLoopOrderingStrategy
TerminalLabelKey
Semantic terminal identity survives compound splitting and reversed provider routes.
WorkError
Neutral failure returned by caller-provided layout work controls.

Traits§

WorkControl
Caller-owned work control for one ELK import/layout invocation.

Functions§

layout
Executes the selected source-backed ELK provider. Unsupported cross-provider boundary edges return a typed error instead of flattening the graph or substituting the Layered provider.
layout_with_operation_seed
Executes Mermaid’s ELK adapter using the seed captured by its owning operation.
layout_with_operation_seed_and_work_control
Executes Mermaid’s ELK adapter with one operation-owned seed and checked work control.
layout_with_work_control
Executes Mermaid’s ELK adapter with caller-owned checked work control.

Type Aliases§

Result