moonrockz/diagrams-plantuml/state

Types

Conversion

pub struct Conversion {
  state : @moonrockz/diagrams/state.StateDiagram?
  diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
}

Source

Document

pub struct Document {
  name : String?
  complete : Bool
  statements : ReadOnlyArray[@moonrockz/diagrams-plantuml/envelope.Statement]
  items : ReadOnlyArray[Statement]
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Document::equal

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

Source

Document::logical_equal

fn Document::logical_equal(self : Document, other : Document) -> Bool

Source

Document::new

fn Document::new(items : ArrayView[Statement], name? : String, complete? : Bool, statements? : ArrayView[@moonrockz/diagrams-plantuml/envelope.Statement]) -> Document

Source

Document::not_equal

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

Source

Document::to_repr

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

Source

Document::without_spans

fn Document::without_spans(self : Document) -> Document

Source

Kind

pub(all) enum Kind {
  Declaration(String, String, String, Bool)
  Close
  Separator(Bool)
  Description(String, String)
  Transition(String, String, String, String)
  Note(String, String?, String, String?)
  Direction(@moonrockz/diagrams/flowchart.Direction)
  Presentation(String)
} derive(Eq, @moonbitlang/core/debug.Debug)

Editable native statements. Open/close/separator values retain lexical order.

Source

Kind::equal

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

Source

Kind::not_equal

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

Source

Kind::to_repr

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

Source

ReadResult

pub struct ReadResult {
  nodes : ReadOnlyArray[@moonrockz/diagrams-plantuml/cst.Node]
  document : Document?
  diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
}

Source

Statement

pub struct Statement {
  kind : Kind
  explicit_label : Bool
  span : @moonrockz/diagrams.Span?
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Statement::equal

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

Source

Statement::new

fn Statement::new(kind : Kind, span? : @moonrockz/diagrams.Span, explicit_label? : Bool) -> Statement

Source

Statement::not_equal

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

Source

Statement::to_repr

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

Source

Values

diagnostic_codes

let diagnostic_codes : ReadOnlyArray[String]

Source

fn print_body(document : Document, limits? : @moonrockz/diagrams-plantuml/envelope.Limits) -> Result[String, ReadOnlyArray[@moonrockz/diagrams.Diagnostic]]

Canonical source is derived from edited values and checked for representability.

Source

read

fn read(scan : @moonrockz/diagrams-plantuml/envelope.Scan, limits? : @moonrockz/diagrams-plantuml/envelope.Limits) -> ReadResult

Read a scanned native state block. Recovery preserves subsequent statements.

Source

to_state

fn to_state(document : Document, id? : String, limits? : @moonrockz/diagrams-plantuml/envelope.Limits) -> Conversion

Build explicit state topology; descriptions and history never execute.

Source