Skip to main content
Rust4PM
Type Reference

Types & Structures

Browse all 229 types used throughout the library. See where each type is used as input or output.

229

Total Types

136

Structs

47

Enums

Structs(136)

AggregatedEventTimestamps

Aggregated event counts per timestamp bin, grouped by activity.

1 output

AlignmentOptions

Options for computing alignment

3 inputs

AlignmentResult

Alignment Result

1 output

AlphaPPPConfig

Algorithm parameters for Alpha+++

1 input

AnnotatedOcpnDrawing

What [`crate::visualization::ocpn`] draws an [`AnnotatedOcpn`] from: the net, build options with a badge per non-flow cell, and dashed borders for the added places.

1 output

AnnotatedOcpnOptions

Settings of the annotated object-centric Petri net.

1 input

Annotations_for_DfgNodeRef

The JSON form of [`Annotations`].

Annotations_for_OcdfgNodeRef

The JSON form of [`Annotations`].

Annotations_for_OcpnNodeRef

The JSON form of [`Annotations`].

Annotations_for_PetriNodeRef

The JSON form of [`Annotations`].

Attribute

Attribute made up of the key and value Depending on usage, the key field might be redundant but useful for some implementations

AttributeChange

A single attribute value change at a point in time.

Attrs

Escape-hatch attributes available on every drawable. The renderer drops attribute *names* that do not match the XML name shape `[A-Za-z_:][A-Za-z0-9_.:-]*` and escapes every value, so neither can break out of the attribute and inject markup.

BaseStyle

Colors, sizes and paddings shared by all model drawings.

Blueprint

A declarative mapping from relational rows to an OCEL. Carries no connection details and no schema snapshot: both are supplied by the caller, which keeps a blueprint portable, shareable and free of secrets.

5 inputs

CompiledOcel

A blueprint compiled to SQL. Serializable but not deserializable: [`Self::errors`] holds [`CompileError`], which is not, so neither is this. Crosses a bindings boundary outbound only, as a compile binding's return value.

1 output

CompileError

A mapping that produced no view, and why. Compilation never fails wholesale: an uncompilable mapping is skipped and recorded here, and everything else still compiles. Serializable but not deserializable: [`RejectReason`] is not, so neither is this.

Connection

A discovered connection between two entities, with timestamps. Only source and target are materialized (not the full intermediate path).

ConnectionEquivalenceClass

A group of schemas that connect the same set of (source, target) pairs.

CostFunction

Cost function for alignment moves. Defines the cost of model moves, log moves, synchronous moves, and silent moves.

DfgBuildOptions

How a [`DirectlyFollowsGraph`] is turned into a [`Graph`].

5 inputs

DfgStyle

Colors a directly-follows graph is drawn with.

3 inputs

DirectlyFollowsGraph

A directly-follows graph of [`Activity`]s, with its start and end activities. Activities and directly-follows relations are annotated with their frequency, and start and end activities with how many traces start or end with them.

5 inputs
1 output

DiscoveredSchema

One enumerated schema with its computed stats and equivalence class.

DottedChartData

Result of [`get_dotted_chart`], containing the plotted points grouped by color.

1 output

DottedChartOptions

Options for [`get_dotted_chart`].

1 input

DottedChartPoints

A series of (x, y) coordinates for one color group in a dotted chart.

DuckDbWriteOptions

Options controlling how an OCEL is written into a `DuckDB` database.

3 inputs

EdgeRoute

How one edge was drawn.

EscapingEdge

An activity (or transition) the model allows in a state, but no trace takes there

EscapingEdgesOptions

Options for [`escaping_edges_precision`]

2 inputs
1 output

EscapingEdgesPrecision

Result of [`escaping_edges_precision`]

2 outputs

EventLogClassifier

Event classifier Enables classifying events by a set of attributes to consider for the _class identity_

EventTimestampOptions

Options for [`event_timestamp_histogram`].

1 input

ExtractionCatalog

The concrete, serializable [`Catalog`]. This is the form that crosses a bindings boundary, that an editor holds and sends back, and that gets pinned to disk so a compile can be reproduced against a schema that has since changed.

2 inputs
2 outputs

ExtractionReport

What [`extract`](super::extract::extract) produced, beyond the OCEL itself. Serializable but not deserializable: [`ExtractionError`] carries `&'static str` fields (a borrow no deserializer can manufacture), so this only ever crosses a bindings boundary outbound, as a `#[register_binding]` return value.

2 outputs

ExtractionTiming

How long a run spent, split by phase, in milliseconds. Schema discovery is a fixed cost a caller holding a catalog can skip, so it is reported apart from the row reading.

FinalizeReport

What a sink did during [`ExtractionSink::finalize`], folded into [`ExtractionReport::finalize`](super::report::ExtractionReport::finalize). All zero for a sink that resolves eagerly. Nonzero entries carry a deferring sink's share of the per-mapping counters.

FitnessResult

Alignment Fitness Result

1 output

FontSpec

The font a text run is measured and drawn with.

Graph

The graph to lay out: nodes addressed by index, edges referring to those indices.

InductiveMinerDfgOptions

Settings of the DFG variant of the Inductive Miner. Settings that need traces, such as the interleaved cut, do not exist here. Fields missing in JSON take their default value.

InductiveMinerOptions

Settings of the Inductive Miner. Each constructor sets up one variant: - [`default`](Self::default): IM - [`imf`](Self::imf): `IMf` with the given noise threshold - [`ima`](Self::ima): IM with the cuts of `IMa` - [`im_thesis`](Self::im_thesis) and [`imf_thesis`](Self::imf_thesis): IM and `IMf` as published, without the refinements of this implementation - [`prom`](Self::prom) and [`pm4py`](Self::pm4py): the settings closest to those tools Fields missing in JSON take their default value.

JsonArc

An arc from a place to a transition or the other way round.

JsonPlace

A place of one object type.

JsonTransition

A transition, silent if it has no label.

Lane

One swimlane: a strip across the whole drawing that holds one group's nodes.

Layout

One laid-out drawing.

16 inputs
11 outputs

LayoutOptions

Everything that steers one layout run.

LayoutRequest

A layered-layout request: the graph, the preset its options start from, and the fields of that preset to change. Every part defaults, so `{}` is a valid request (an empty graph, the layered preset). ``` use graphlay::json::LayoutRequest; use graphlay::{Direction, RoutingStyle}; let request: LayoutRequest = serde_json::from_str(r#"{ "graph": {"nodes": [{"size": {"width": 80, "height": 40}}, {"size": {"width": 80, "height": 40}}], "edges": [{"source": 0, "target": 1}]}, "preset": "process_map", "options": {"routing": {"style": "diagonal"}} }"#)?; let (graph, options) = request.split()?; assert_eq!(options.routing.style, RoutingStyle::Diagonal); // from the patch assert_eq!(options.direction, Direction::TopBottom); // from the preset let l = graphlay::layout(&graph, &options)?; assert!(l.nodes[0].center.y < l.nodes[1].center.y); // A bad patch is an error that names the field. let bad: LayoutRequest = serde_json::from_str(r#"{"options": {"routing": {"style": "curvy"}}}"#)?; assert!(bad.split().unwrap_err().starts_with("options.routing.style:")); # Ok::<(), Box<dyn std::error::Error>>(()) ```

2 inputs

LayoutStats

Counters from the run that produced a [`Layout`].

MappingStats

Counts for one mapping's run.

MarkerDef

A user-defined `<marker>`.

ModelLayoutRequest

The layout request of a model, with the model element behind each of its nodes and edges: `layout.nodes[i]` of its layout is where `nodes[i]` went.

8 outputs

Node3

A node in the row graph.

ObjectAttributeChanges

Time-stamped attribute change history for a single OCEL object.

1 output

ObjectCentricPetriNetJson

An object-centric Petri net as a flat list of places, transitions and arcs. Transitions shared by several object types are listed once. Each arc has the object type of its place.

5 inputs
1 output

ObjectInvolvementCounts

Stores statistics on the number of objects of a certain type involved with an activity or in an O2O relationship.

OCDeclareArc

OC-DECLARE Constraint arc/edge between two nodes (i.e., activities)

1 input

OCDeclareArcLabel

Object Involvement Label of an OC-DECLARE arc

OCDeclareBuildOptions

How a slice of [`OCDeclareArc`]s is turned into a [`Graph`]. Missing fields take the values of [`OCDeclareBuildOptions::new`].

5 inputs

OCDeclareDiscoveryOptions

Options for the automatic discovery of OC-DECLARE constraints

1 input

OCDeclareEdgeRef

Which arcs a laid-out edge draws.

OCDeclareStyle

Colors and sizes of an OC-DECLARE drawing.

3 inputs

OcdfgBuildOptions

How an [`OCDirectlyFollowsGraph`] is turned into a [`Graph`].

5 inputs

OcdfgEdgeRef

An edge of an [`OCDirectlyFollowsGraph`] drawing, in one object type's DFG.

OcdfgStyle

Colors an object-centric directly-follows graph is drawn with.

3 inputs

OCDirectlyFollowsGraph

An object-centric directly-follows graph containing a [`DirectlyFollowsGraph`] for each object type involved.

5 inputs
1 output

OCEL

Object-centric Event Log Consists of multiple [`OCELEvent`]s and [`OCELObject`]s with corresponding event and object [`OCELType`]s Deserializing reads a string attribute value as a timestamp (if it is one) only when its event or object type does not declare the attribute with another type.

1 input
1 output

OCELAppendBatch

Events, objects and type declarations to add with [`locel_append_batch`]

1 input

OCELAppendSummary

What a [`locel_append_batch`] call added

1 output

OCELEvent

OCEL Event

1 output

OCELEventAttribute

OCEL Event Attributes

OCELImportOptions

Options for importing an OCEL, in any format.

1 input

OCELObject

OCEL Object

1 output

OCELObjectAttribute

OCEL Object Attribute Describing a named value _at a certain point in time_

OCELRelationship

OCEL Relationship (qualified; referring back to an [`OCELObject`])

OCELType

OCEL Event/Object Type

OCELTypeAttribute

OCEL Attribute types

OCELTypeStats

Statistics on the event and object types of an OCEL

1 output

OcpnArcRef

An arc of an object-centric Petri net drawing.

OcpnBuildOptions

How an object-centric Petri net is turned into a [`Graph`].

5 inputs

OcpnDiscoveryOptions

Settings for object-centric Petri net discovery. In JSON, fields left out take their default value.

1 input

OcpnStyle

Colors and sizes an object-centric Petri net drawing uses.

4 inputs

OcTypeGraph

The types of an OCEL and the relations between them.

5 inputs
1 output

OcTypeGraphBuildOptions

How a [`OcTypeGraph`] is turned into a [`Graph`].

5 inputs

OcTypeGraphEdge

A relation between two types, by their index in [`OcTypeGraph::nodes`]. One from an event type is an E2O relation, one from an object type an O2O relation, which is drawn dashed.

OcTypeGraphNode

An event type or object type.

OcTypeGraphStyle

Colors and sizes a type graph is drawn with.

3 inputs

OperatorColors

The color of each operator type in the color-coded look.

Overlay

A fragment or panel drawn outside the node/edge stack.

Palette

The six colours every drawable falls back to. Pass the on-screen theme's resolved colours here so an export matches the screen.

PartialOrderBuildOptions

How a [`PartialOrderTrace`] is turned into a [`Graph`].

5 inputs

PartialOrderStyle

Colors a partial order trace is drawn with.

3 inputs

PartialOrderTrace

A partial order trace of [`Event`]s. Contains all events of a trace and their particular partial relations.

5 inputs

PathConnectionParams

Parameters for connection finding.

1 input

PathSchemaConnections

Connections of a single schema, with metrics and throughput.

1 output

PathSchemaDiscovery

Result of [`discover_path_schemas`].

1 output

PathSchemaEnumeration

Result of [`path_schema_enumerate`].

1 output

PathSchemaQuery

A discovery query: source/target types, max schema length, and connection params.

1 input

PetriArcRef

An arc of a Petri net drawing.

PetriBuildOptions

How a Petri net is turned into a [`Graph`].

5 inputs

PetriStyle

Colors a Petri net drawing uses.

3 inputs

Place

Place in a [`PetriNet`]

Placement

Where one node ended up.

Point

A point in output (drawing) space, in px.

Probe

A data-dependent assumption the compiled relations make, as SQL that returns zero rows when the assumption holds.

ProcessTree

Object-centric process tree struct that contains [`Node`] as root

5 inputs
1 output

ProcessTreeBuildOptions

How a [`ProcessTree`] is turned into a [`Graph`].

5 inputs

ProcessTreeStyle

Colors a process tree is drawn with.

3 inputs

ProcessVariant

A process variant (activity sequence with its frequency)

PushdownDeclined

One node the compiler refused to push down to its source, and why.

RawSvg

Raw SVG the caller vouches for, emitted verbatim exactly once. `bounds` is mandatory because the renderer cannot parse the markup. It is the only way the fragment takes part in [`Scene::bounds`].

Rect

An axis-aligned rectangle from its top-left `min` to its bottom-right `max`. The default is the empty rectangle at the origin.

ReflowCell

One cell of the result.

ReflowCellRef

A cell, by activity and object type.

ReflowOptions

Settings of [`reflow`].

2 inputs

ReflowStats

Sizes and how the search went.

ReflowSummary

The cells and counts of a [`ReflowResult`].

1 output

ResolvedPathSchema

A self-contained, serializable path schema: edges are embedded, so no [`TypeGraph`] is needed to interpret or traverse it. Produced via [`PathSchema::resolve`].

1 input

ResolvedStep

One step of a [`ResolvedPathSchema`]: a typed edge plus traversal direction.

Scene

One complete drawing.

1 input
8 outputs

SceneEdge

One edge: an already-routed polyline plus its styling, markers, labels and decorations.

SceneNode

One node: a shape at a position, plus whatever is drawn inside it.

SchemaStats

Metrics plus optional throughput for a single schema.

StyleOverrides

Per-element style changes, keyed by the index of the node or edge in the model's graph, which is also its index in the layout and in the layout request's `nodes` and `edges`.

16 inputs

SymbolDef

A reusable fragment, emitted once as `<symbol>` and drawn with `<use>`. The markup is in the symbol's own `view_box` coordinates. A fragment that should take the colour of the place it is used paints with `currentColor`, since the renderer sets `color` on the `<use>` element.

TablePreview

A few real rows of one table, for display only. Rows are aligned to [`TablePreview::columns`] so a wide table can be read across. A cell is `None` for SQL `NULL`, distinct from `Some(String::new())`.

2 outputs

TableSchema

One table's declared shape.

TokenBasedReplayResult

Result from the token-based replay computation

1 output

Transition

Transition in a [`PetriNet`]

TreeOptions

What steers a tidy-tree layout.

TreeRequest

A tidy-tree request: a rooted tree or forest, and the [`TreeOptions`] fields to change.

1 input

TypeBadge

An object type drawn as a badge in the node of an activity, e.g., one that takes part without places or edges of its own, alone or after the badge of the type it follows from.

VariantAlignmentResult

Alignment result for a single trace variant

ViewDef

One compiled relation: a name and the bare `SELECT` that defines it.

Enums(47)

AbstractionKind

The abstractions Reflow can select by name.

AlignmentMove

A single alignment step

DfgEdgeRef

An edge of a [`DirectlyFollowsGraph`] drawing, with its count.

DfgNodeRef

A node of a [`DirectlyFollowsGraph`] drawing, e.g., `{"kind": "activity", "name": "pay"}`.

Direction

Primary flow direction of the layered layout. Default [`Direction::LeftRight`]. The output is in screen coordinates either way (`x` right, `y` down). The direction decides which axis the layers advance along. Options named in flow terms ([`crate::Margins`], [`LoopSide`], [`PortSides`]) turn with it. Port hints ([`crate::PortHint`]) and the output do not. ``` use graphlay::{layout, Direction, GraphBuilder, LayoutOptions, Size}; let mut b = GraphBuilder::new(); let a = b.add_box(Size::new(100.0, 40.0)); let c = b.add_box(Size::new(100.0, 40.0)); b.connect(a, c); let g = b.build(); let mut o = LayoutOptions::layered_default(); o.direction = Direction::LeftRight; // the default let across = layout(&g, &o)?; let gap = across.nodes[1].center.x - across.nodes[0].center.x - 100.0; assert!((gap - o.spacing.layer_gap).abs() < 0.5); o.direction = Direction::TopBottom; let down = layout(&g, &o)?; // The same layer gap, now between a 40px-tall box and the one below it. let gap = down.nodes[1].center.y - down.nodes[0].center.y - 40.0; assert!((gap - o.spacing.layer_gap).abs() < 0.5); # Ok::<(), graphlay::LayoutError>(()) ``` There is no `BottomTop` or `RightLeft`. Mirroring the layer axis would reverse the handedness the order axis, port sides and routing repairs assume.

DottedChartColorAxis

Color-axis mode for the dotted chart.

DottedChartXAxis

X-axis mode for the dotted chart.

DottedChartYAxis

Y-axis mode for the dotted chart.

DrawOrder

Whether edges are painted before or after nodes.

DuplicateObjectPolicy

What to do when an object id is produced more than once.

EmissionShape

Which OCEL surface the compiler emits.

1 input

EscapingEdgesPreset

Whose escaping-edges precision a run follows

1 input

EventSelection

Strategy for choosing target events when several are reachable from one source.

ExtractionError

Why [`extract`](super::extract::extract) could not run at all, or a non-fatal problem recorded in [`ExtractionReport::errors`] while it did. Serializable but not deserializable: some variants carry `&'static str` fields (a borrow no deserializer can manufacture), so this only ever crosses a bindings boundary outbound.

IdRendering

How entity ids are rendered, for events and objects alike.

InductiveMiner

An Inductive Miner with its settings: one that recurses on the log, or the directly-follows variant ([`InductiveMinerDfgOptions`]). In JSON, `kind` tells them apart, e.g., `{"kind": "log", "noise_threshold": 0.2}` or `{"kind": "dfg"}`, and fields left out take their default value.

2 inputs
1 output

InductiveMinerPreset

Whose Inductive Miner a run follows.

1 input

InductiveMinerVariant

The published variants of the Inductive Miner.

1 input

LogPaths

Where the paths through the model come from

MappingEntry

A mapping, or an ordered group of them. `Single` is not boxed: it is the overwhelmingly common case, and callers construct and match it directly.

MissingEndpointPolicy

What to do when a relation names an entity that does not exist.

Node2

Node in a process tree

Nullable_EventIndex

1 output

Nullable_ExtractionCatalog

3 inputs

Nullable_ObjectIndex

1 output

Nullable_OCELAttributeValue

1 output

Nullable_OCELType

2 outputs

Nullable_Palette

18 inputs

Nullable_TypeRef

1 input

O2OMode

O2O Mode for OC-DECLARE Discovery Determines to what extent object-to-object (O2O) relationships are considered

OCDeclareArcType

OC-DECLARE Arc Direction/Type Models temporal relationships

OCDeclareLabels

How an arc shows its object types.

OCDeclareReductionMode

Mode for reducing OC-DECLARE constraints

1 input

OcdfgNodeRef

A node of an [`OCDirectlyFollowsGraph`] drawing, e.g., `{"kind": "start", "name": "orders"}`. The name is the object type of a terminal, or the activity.

OCELAttributeValue

OCEL Attribute Values

1 input

OcpnNodeRef

A place or transition of an object-centric Petri net drawing, by its index in the flat JSON's `places` or `transitions`, e.g., `{"kind": "place", "index": 3}`.

PetriNodeRef

A place or transition of a Petri net drawing, e.g., `{"kind": "place", "index": 3}`.

Preset

A named starting point for [`LayoutOptions`], so a caller or a JSON request ([`crate::json::LayoutRequest`]) picks the kind of drawing and changes only what it needs.

ProcessTreeNodeRef

A node of a [`ProcessTree`], by its path of child indices from the root, e.g., `{"kind": "leaf", "path": [0, 2]}`.

SearchStrategy

How the flow layer is searched.

SilentTransitions

How silent transitions take part in the measure

SqlDialect

Which SQL engine the emitted statements target. The two are not equally evidenced: `DuckDb` is checked row-for-row against the extractor by the differential suite, while `Postgres` is only covered by unit tests over the emitted text.

1 input

TemporalConstraint

Temporal constraint applied along a path.

TraceEnds

How traces that end in a state count there

TreeLook

How a process tree is drawn.

TypeRef

A reference to an OCEL type: an event type or an object type, by name. Type-level analogue of [`EntityRef`] (which references an instance). Event and object types live in separate namespaces, so the same name can denote both; carrying the kind here keeps them distinct everywhere a type is named.

1 input

ValidationError

A reason a blueprint cannot be executed or compiled.

Other Types(46)

AcceptingPetriNet

11 inputs
2 outputs

AnnotatedOcpn

3 inputs
1 output

DateTime

2 inputs
1 output

EdgeId

Index of an edge in [`Graph::edges`].

EventHash

A struct to create a [`Hash`] value from an [`Event`].

EventIndex

An Event Index Points to an event in the context of a given OCEL

8 inputs
1 output

EventLog

3 inputs
1 output

EventLogActivityProjection

11 inputs

f64

1 input
2 outputs

Map_of_Map_of_ObjectInvolvementCounts

1 output

Map_of_string

9 inputs

Marking

Tokens per place of a Petri net Places without tokens are not stored, so equal markings compare (and hash) equal. Iteration is in place order. In JSON, a marking is an object from place index to tokens (e.g., `{"0": 1}`).

Nullable_Array_of_string

1 output

Nullable_Array_of_TypeRef

1 input

Nullable_string

2 inputs

Nullable_uint

4 inputs

ObjectCentricPetriNet

1 output

ObjectIndex

An Object Index Points to an object in the context of a given OCEL

15 inputs
1 output

OCDeclareNode

OC-DECLARE node (Activity or Object Init/Exit)

OCDeclareNodeRef

An activity of an OC-DECLARE model.

output_id

Store the result under this id instead of a generated one.

15 inputs

ReflowResult

5 inputs
3 outputs

Set_of_string

1 input

SlimLinkedOCEL

64 inputs
7 outputs

u64

1 output

usize

3 inputs
3 outputs

Vec<EventIndex>

1 output

Vec<ObjectIndex>

1 output

Vec<OCDeclareArc>

7 inputs
3 outputs

Vec<OCELAttributeValue>

1 input

Vec<OCELTypeAttribute>

2 inputs

Vec<Point>

1 input

Vec<ProcessVariant>

2 outputs

Vec<ReflowCellRef>

1 input

Vec<String>

1 input
9 outputs

Vec<Tuple_of_Array_of_string_and_uint>

1 output

Vec<Tuple_of_DateTime_and_OCELAttributeValue>

1 output

Vec<Tuple_of_string_and_EventIndex>

1 output

Vec<Tuple_of_string_and_int64_and_string>

1 output

Vec<Tuple_of_string_and_int64>

1 output

Vec<Tuple_of_string_and_ObjectIndex>

2 inputs
3 outputs

Vec<Tuple_of_string_and_string_and_int64>

1 output

Vec<Tuple_of_Tuple_of_string_and_string_and_uint>

1 output

Vec<ValidationError>

1 output

Vec<VariantAlignmentResult>

2 inputs
1 output

Vec<Vec<Tuple_of_DateTime_and_OCELAttributeValue>>

1 input