moonrockz/diagrams/sequence

Types

Autonumber

pub(all) enum Autonumber {
  On(start~ : Double?, step~ : Double?)
  Off
} derive(Eq, @moonbitlang/core/debug.Debug)

A numbering change at this point in the event stream.

Source

Autonumber::equal

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

Source

Autonumber::not_equal

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

Source

Autonumber::to_repr

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

Source

BoxGroup

pub struct BoxGroup {
  id : String
  label : String
  colour : String?
} derive(Eq, @moonbitlang/core/debug.Debug)

A box group. id distinguishes groups that have the same label.

Source

BoxGroup::equal

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

Source

BoxGroup::new

fn BoxGroup::new(id : String, label : String, colour? : String) -> BoxGroup

Source

BoxGroup::not_equal

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

Source

BoxGroup::to_repr

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

Source

Event

pub(all) enum Event {
  Message(Message)
  Note(Note)
  Activate(String)
  Deactivate(String)
  Create(String)
  Destroy(String)
  Frame(Frame)
  Autonumber(Autonumber)
} derive(Eq, @moonbitlang/core/debug.Debug)

One event of a sequence, in diagram order.

Source

Event::equal

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

Source

Event::not_equal

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

Source

Event::to_repr

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

Source

Frame

pub struct Frame {
  kind : FrameKind
  sections : ReadOnlyArray[Section]
  colour : String?
} derive(Eq, @moonbitlang/core/debug.Debug)

A nested frame. A first section is required; colour belongs to rect frames. The colour is stored on the frame rather than as a section label.

Source

Frame::equal

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

Source

Frame::new

fn Frame::new(kind : FrameKind, first : Section, rest? : ArrayView[Section], colour? : String) -> Frame

Source

Frame::not_equal

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

Source

Frame::to_repr

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

Source

FrameKind

pub(all) enum FrameKind {
  Loop
  Alt
  Opt
  Par
  ParOver
  Critical
  Break
  Rect
  Try
} derive(Eq, @moonbitlang/core/debug.Debug)

The meaning of a frame. ParOver permits overlapping parallel sections.

Source

FrameKind::equal

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

Source

FrameKind::not_equal

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

Source

FrameKind::to_repr

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

Source

pub(all) enum Head {
  NoHead
  Arrow
  OpenArrow
  Cross
  Async
  HalfArrow(upper~ : Bool, filled~ : Bool)
  Central(Head)
} derive(Eq, @moonbitlang/core/debug.Debug)

What a message line has at one of its ends.

Source

Head::equal

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

Source

Head::not_equal

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

Source

Head::to_repr

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

Source

LineStyle

pub(all) enum LineStyle {
  Solid
  Dotted
} derive(Eq, @moonbitlang/core/debug.Debug)

The line of a message.

Source

LineStyle::equal

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

Source

LineStyle::not_equal

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

Source

LineStyle::to_repr

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

Source

pub struct Link {
  scheme : LinkScheme
  target : String
} derive(Eq, @moonbitlang/core/debug.Debug)

A format-independent link. Smithy targets use the canonical # spelling.

Source

Link::equal

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

Source

Link::new

fn Link::new(scheme : LinkScheme, target : String) -> Link

Source

Link::not_equal

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

Source

Link::to_repr

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

Source

LinkScheme

pub(all) enum LinkScheme {
  Smithy
  OpenRpc
} derive(Eq, @moonbitlang/core/debug.Debug)

The schemes understood by diagram adapters.

Source

LinkScheme::equal

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

Source

LinkScheme::not_equal

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

Source

LinkScheme::to_repr

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

Source

Message

pub struct Message {
  sender : String
  receiver : String
  line : LineStyle
  sender_head : Head
  receiver_head : Head
  label : String
  link : Link?
  properties : MessageProperties?
  number : Double?
} derive(Eq, @moonbitlang/core/debug.Debug)

A message from sender to receiver.

Source

Message::equal

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

Source

Message::new

fn Message::new(sender : String, receiver : String, label : String, line? : LineStyle, sender_head? : Head, receiver_head? : Head, link? : Link, properties? : MessageProperties, number? : Double) -> Message

A message. The default is a solid line with an arrowhead at the receiver.

Source

Message::not_equal

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

Source

Message::to_repr

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

Source

Message::with_properties

fn Message::with_properties(self : Message, properties : MessageProperties) -> Message

Source

MessageProperties

pub struct MessageProperties {
  sublabel : String?
  description : String?
} derive(Eq, @moonbitlang/core/debug.Debug)

Additional message text supplied by an adapter.

Source

MessageProperties::equal

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

Source

MessageProperties::new

fn MessageProperties::new(sublabel? : String, description? : String) -> MessageProperties

Source

MessageProperties::not_equal

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

Source

MessageProperties::to_repr

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

Source

Note

pub struct Note {
  placement : Placement
  participants : ReadOnlyArray[String]
  text : String
} derive(Eq, @moonbitlang/core/debug.Debug)

A note on one or more participants.

Source

Note::equal

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

Source

Note::new

fn Note::new(placement : Placement, participants : ArrayView[String], text : String) -> 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

Participant

pub struct Participant {
  id : String
  label : String
  kind : ParticipantKind
  group : BoxGroup?
  link : Link?
  icon : @moonrockz/diagrams/icons.Reference?
  properties : ParticipantProperties?
} derive(Eq, @moonbitlang/core/debug.Debug)

One participant of a sequence. id is unique in the sequence.

Source

Participant::equal

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

Source

Participant::new

fn Participant::new(id : String, label? : String, kind? : ParticipantKind, group? : BoxGroup, link? : Link, properties? : ParticipantProperties, icon? : @moonrockz/diagrams/icons.Reference) -> Participant

A participant. The label is the id when no label is given.

Source

Participant::not_equal

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

Source

Participant::render_kind

fn Participant::render_kind(self : Participant) -> ParticipantKind

The kind for rendering, falling back to the declared kind.

Source

Participant::to_repr

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

Source

Participant::with_properties

fn Participant::with_properties(self : Participant, properties : ParticipantProperties) -> Participant

Return a participant with new render properties, leaving the input unchanged.

Source

ParticipantKind

pub(all) enum ParticipantKind {
  Participant
  Actor
  Boundary
  Control
  Entity
  Database
  Collections
  Queue
  Service
  Resource
  Client
} derive(Eq, @moonbitlang/core/debug.Debug)

What a participant is. A renderer uses the kind to select a style.

Source

ParticipantKind::equal

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

Source

ParticipantKind::not_equal

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

Source

ParticipantKind::to_repr

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

Source

ParticipantProperties

pub struct ParticipantProperties {
  kind : ParticipantKind?
  sublabel : String?
  description : String?
} derive(Eq, @moonbitlang/core/debug.Debug)

Properties supplied by an adapter. The declared kind stays on the participant.

Source

ParticipantProperties::equal

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

Source

ParticipantProperties::new

fn ParticipantProperties::new(kind? : ParticipantKind, sublabel? : String, description? : String) -> ParticipantProperties

Source

ParticipantProperties::not_equal

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

Source

ParticipantProperties::to_repr

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

Source

Placement

pub(all) enum Placement {
  LeftOf
  RightOf
  Over
} derive(Eq, @moonbitlang/core/debug.Debug)

The placement of a note.

Source

Placement::equal

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

Source

Placement::not_equal

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

Source

Placement::to_repr

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

Source

Resolution

pub struct Resolution {
  sequence : Sequence
  diagnostics : ReadOnlyArray[@moonrockz/diagrams.Diagnostic]
}

A resolved model and warnings for targets absent from the source.

Source

Section

pub struct Section {
  role : SectionRole
  label : String?
  events : ReadOnlyArray[Event]
} derive(Eq, @moonbitlang/core/debug.Debug)

Source

Section::equal

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

Source

Section::new

fn Section::new(events : ArrayView[Event], label? : String, role? : SectionRole) -> Section

Source

Section::not_equal

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

Source

Section::to_repr

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

Source

SectionRole

pub(all) enum SectionRole {
  Plain
  Try
  Catch
  Finally
} derive(Eq, @moonbitlang/core/debug.Debug)

One ordered section of a frame.

Source

SectionRole::equal

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

Source

SectionRole::not_equal

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

Source

SectionRole::to_repr

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

Source

Sequence

pub struct Sequence {
  participants : ReadOnlyArray[Participant]
  events : ReadOnlyArray[Event]
  title : String?
  accessibility_title : String?
  accessibility_description : String?
} derive(Eq, @moonbitlang/core/debug.Debug)

A sequence diagram without a link to one diagram format.

Source

Sequence::equal

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

Source

Sequence::new

fn Sequence::new(participants : ArrayView[Participant], events : ArrayView[Event], title? : String, accessibility_title? : String, accessibility_description? : String) -> Sequence

A sequence. The model keeps copies of participants and events, so a later change to the input arrays does not change it.

Source

Sequence::not_equal

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

Source

Sequence::participant

fn Sequence::participant(self : Sequence, id : String) -> Participant?

The participant with the id id.

Source

Sequence::to_repr

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

Source

Traits

LinkSource

pub(open) trait LinkSource {
  fn participant(Self, Link) -> ParticipantProperties?
  fn message(Self, Link) -> MessageProperties?
}

A pure adapter for a source such as a Smithy model. Implementations return only render properties. resolve keeps all diagram structure and links.

Source

Values

resolve

fn[S : LinkSource] resolve(sequence : Sequence, source : S) -> Resolution

Resolve links without changing the input or allowing the source to replace participants, events, labels, numbering or links. Existing properties remain when a source does not know a target.

Source