moonrockz/diagrams/state

Types

Note

pub struct Note {
  id : String
  text : String
  targets : ReadOnlyArray[String]
  connection_targets : ReadOnlyArray[String]
  placement : String
  region : String
  origin : @moonrockz/diagrams/flowchart.SourceBinding?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Note::equal

fn Note::equal(Note, Note) -> Bool

Source

Note::new

fn Note::new(id : String, text : String, targets? : ArrayView[String], connection_targets? : ArrayView[String], placement? : String, region? : String, origin? : @moonrockz/diagrams/flowchart.SourceBinding) -> Note

Source

Note::not_equal

fn Note::not_equal(x : Note, y : Note) -> Bool

Source

Note::to_repr

fn Note::to_repr(Note) -> @moonbitlang/core/debug.Repr

Source

Region

pub struct Region {
  id : String
  owner : String?
  members : ReadOnlyArray[String]
  separator : Separator
  direction : @moonrockz/diagrams/flowchart.Direction?
  origin : @moonrockz/diagrams/flowchart.SourceBinding?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Region::equal

fn Region::equal(Region, Region) -> Bool

Source

Region::new

fn Region::new(id : String, owner? : String, members? : ArrayView[String], separator? : Separator, direction? : @moonrockz/diagrams/flowchart.Direction, origin? : @moonrockz/diagrams/flowchart.SourceBinding) -> Region

Source

Region::not_equal

fn Region::not_equal(x : Region, y : Region) -> Bool

Source

Region::to_repr

fn Region::to_repr(Region) -> @moonbitlang/core/debug.Repr

Source

Role

pub(all) enum Role {
  Simple
  Composite
  Initial
  Final
  Choice
  Fork
  Join
  ShallowHistory
  DeepHistory
  EntryPoint
  ExitPoint
  InputPin
  OutputPin
  ExpansionInput
  ExpansionOutput
  Unsupported(String)
} derive(Eq, @moonbitlang/core/debug.Debug)

Source-independent state roles. History and boundaries describe drawn structure.

Source

Role::equal

fn Role::equal(Role, Role) -> Bool

Source

Role::not_equal

fn Role::not_equal(x : Role, y : Role) -> Bool

Source

Role::to_repr

fn Role::to_repr(Role) -> @moonbitlang/core/debug.Repr

Source

Separator

pub(all) enum Separator {
  Horizontal
  Vertical
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Separator::equal

fn Separator::equal(Separator, Separator) -> Bool

Source

Separator::not_equal

fn Separator::not_equal(x : Separator, y : Separator) -> Bool

Source

Separator::to_repr

fn Separator::to_repr(Separator) -> @moonbitlang/core/debug.Repr

Source

State

pub struct State {
  id : String
  label : String
  region : String
  role : Role
  descriptions : ReadOnlyArray[String]
  expanded : Bool
  direction : @moonrockz/diagrams/flowchart.Direction?
  origin : @moonrockz/diagrams/flowchart.SourceBinding?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

State::equal

fn State::equal(State, State) -> Bool

Source

State::new

fn State::new(id : String, label? : String, region? : String, role? : Role, descriptions? : ArrayView[String], expanded? : Bool, direction? : @moonrockz/diagrams/flowchart.Direction, origin? : @moonrockz/diagrams/flowchart.SourceBinding) -> State

Source

State::not_equal

fn State::not_equal(x : State, y : State) -> Bool

Source

State::to_repr

fn State::to_repr(State) -> @moonbitlang/core/debug.Repr

Source

State::with_descriptions

fn State::with_descriptions(self : State, descriptions : ArrayView[String]) -> State

Source

State::with_label

fn State::with_label(self : State, label : String) -> State

Source

StateDiagram

pub struct StateDiagram {
  id : String
  states : ReadOnlyArray[State]
  transitions : ReadOnlyArray[Transition]
  regions : ReadOnlyArray[Region]
  notes : ReadOnlyArray[Note]
  direction : @moonrockz/diagrams/flowchart.Direction
  title : String?
  accessibility_title : String?
  accessibility_description : String?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

StateDiagram::equal

fn StateDiagram::equal(StateDiagram, StateDiagram) -> Bool

Source

StateDiagram::new

fn StateDiagram::new(id : String, states : ArrayView[State], transitions : ArrayView[Transition], regions? : ArrayView[Region], notes? : ArrayView[Note], direction? : @moonrockz/diagrams/flowchart.Direction, title? : String, accessibility_title? : String, accessibility_description? : String) -> StateDiagram

Source

StateDiagram::not_equal

fn StateDiagram::not_equal(x : StateDiagram, y : StateDiagram) -> Bool

Source

StateDiagram::to_repr

fn StateDiagram::to_repr(StateDiagram) -> @moonbitlang/core/debug.Repr

Source

StateDiagram::with_direction

fn StateDiagram::with_direction(self : StateDiagram, direction : @moonrockz/diagrams/flowchart.Direction) -> StateDiagram

Source

StateDiagram::with_states

fn StateDiagram::with_states(self : StateDiagram, states : ArrayView[State]) -> StateDiagram

Source

Transition

pub struct Transition {
  id : String
  source : String
  target : String
  label : String
  style : @moonrockz/diagrams/flowchart.LineStyle
  source_marker : @moonrockz/diagrams/flowchart.Marker
  target_marker : @moonrockz/diagrams/flowchart.Marker
  min_length : Int
  direction : @moonrockz/diagrams/flowchart.FlowDirection
  direction_hint : @moonrockz/diagrams/flowchart.Direction?
  origin : @moonrockz/diagrams/flowchart.SourceBinding?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Transition::equal

fn Transition::equal(Transition, Transition) -> Bool

Source

Transition::new

fn Transition::new(id : String, source : String, target : String, label? : String, style? : @moonrockz/diagrams/flowchart.LineStyle, source_marker? : @moonrockz/diagrams/flowchart.Marker, target_marker? : @moonrockz/diagrams/flowchart.Marker, min_length? : Int, direction_hint? : @moonrockz/diagrams/flowchart.Direction, origin? : @moonrockz/diagrams/flowchart.SourceBinding) -> Transition

Source

Transition::not_equal

fn Transition::not_equal(x : Transition, y : Transition) -> Bool

Source

Transition::to_repr

fn Transition::to_repr(Transition) -> @moonbitlang/core/debug.Repr

Source

Values

fresh_id

fn fresh_id(stem : String, used : ArrayView[String], work_limit? : Int) -> Result[String, @moonrockz/diagrams.Diagnostic]

Source

validate

fn validate(model : StateDiagram, nodes_limit? : Int, edges_limit? : Int, regions_limit? : Int, depth_limit? : Int, diagnostics_limit? : Int, work_limit? : Int) -> ReadOnlyArray[@moonrockz/diagrams.Diagnostic]

Validate references and ownership, without evaluating state-machine behavior. Exhaustion uses state/model-limit, state/depth-limit or state/work-limit.

Source