Sign in

    moonrockz/diagrams/sequence does not have a README file

    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.

    Autonumber

    pub(all) enum Autonumber {
    On(start~ : Double?, step~ : Double?)
    Off
    } derive(Eq,
    Debug
    )

    A numbering change at this point in the event stream.

    Autonumber::equal

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

    Autonumber::not_equal

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

    BoxGroup

    pub struct BoxGroup {
    id : String
    label : String
    colour : String?
    } derive(Eq,
    Debug
    )

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

    BoxGroup::equal

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

    BoxGroup::new

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

    BoxGroup::not_equal

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

    BoxGroup::to_repr

    Event

    pub(all) enum Event {
    Message(Message)
    Note(Note)
    Activate(String)
    Deactivate(String)
    Create(String)
    Destroy(String)
    Frame(Frame)
    Autonumber(Autonumber)
    } derive(Eq,
    Debug
    )

    One event of a sequence, in diagram order.

    Event::equal

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

    Event::not_equal

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

    Event::to_repr

    Frame

    pub struct Frame {
    kind : FrameKind
    sections : ReadOnlyArray[Section]
    colour : String?
    } derive(Eq,
    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.

    Frame::equal

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

    Frame::new

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

    Frame::not_equal

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

    Frame::to_repr

    FrameKind

    pub(all) enum FrameKind {
    Loop
    Alt
    Opt
    Par
    ParOver
    Critical
    Break
    Rect
    } derive(Eq,
    Debug
    )

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

    FrameKind::equal

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

    FrameKind::not_equal

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

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

    What a message line has at one of its ends.

    Head::equal

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

    Head::not_equal

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

    Head::to_repr

    LineStyle

    pub(all) enum LineStyle {
    Solid
    Dotted
    } derive(Eq,
    Debug
    )

    The line of a message.

    LineStyle::equal

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

    LineStyle::not_equal

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

    pub struct Link {
    scheme : LinkScheme
    target : String
    } derive(Eq,
    Debug
    )

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

    Link::equal

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

    Link::new

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

    Link::not_equal

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

    Link::to_repr

    LinkScheme

    pub(all) enum LinkScheme {
    Smithy
    OpenRpc
    } derive(Eq,
    Debug
    )

    The schemes understood by diagram adapters.

    LinkScheme::equal

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

    LinkScheme::not_equal

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

    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,
    Debug
    )

    A message from sender to receiver.

    Message::equal

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

    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.

    Message::not_equal

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

    Message::to_repr

    Message::with_properties

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

    MessageProperties

    pub struct MessageProperties {
    sublabel : String?
    description : String?
    } derive(Eq,
    Debug
    )

    Additional message text supplied by an adapter.

    MessageProperties::equal

    MessageProperties::new

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

    MessageProperties::not_equal

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

    Note

    pub struct Note {
    placement : Placement
    participants : ReadOnlyArray[String]
    text : String
    } derive(Eq,
    Debug
    )

    A note on one or more participants.

    Note::equal

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

    Note::new

    fn Note::new(placement : Placement, participants : ArrayView[String], text : String) -> Note

    Note::not_equal

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

    Note::to_repr

    Participant

    pub struct Participant {
    id : String
    label : String
    kind : ParticipantKind
    group : BoxGroup?
    link : Link?
    properties : ParticipantProperties?
    } derive(Eq,
    Debug
    )

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

    Participant::equal

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

    Participant::new

    fn Participant::new(id : String, label? : String, kind? : ParticipantKind, group? : BoxGroup, link? : Link, properties? : ParticipantProperties) -> Participant

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

    Participant::not_equal

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

    Participant::render_kind

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

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

    Participant::with_properties

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

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

    ParticipantKind

    pub(all) enum ParticipantKind {
    Participant
    Actor
    Boundary
    Control
    Entity
    Database
    Collections
    Queue
    Service
    Resource
    Client
    } derive(Eq,
    Debug
    )

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

    ParticipantKind::equal

    ParticipantKind::not_equal

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

    ParticipantProperties

    pub struct ParticipantProperties {
    kind : ParticipantKind?
    sublabel : String?
    description : String?
    } derive(Eq,
    Debug
    )

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

    ParticipantProperties::equal

    ParticipantProperties::new

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

    ParticipantProperties::not_equal

    Placement

    pub(all) enum Placement {
    LeftOf
    RightOf
    Over
    } derive(Eq,
    Debug
    )

    The placement of a note.

    Placement::equal

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

    Placement::not_equal

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

    Resolution

    pub struct Resolution {
    sequence : Sequence
    diagnostics : ReadOnlyArray[
    Diagnostic
    ]
    }

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

    Section

    pub struct Section {
    label : String?
    events : ReadOnlyArray[Event]
    } derive(Eq,
    Debug
    )

    One ordered section of a frame.

    Section::equal

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

    Section::new

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

    Section::not_equal

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

    Section::to_repr

    Sequence

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

    A sequence diagram without a link to one diagram format.

    Sequence::equal

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

    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.

    Sequence::not_equal

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

    Sequence::participant

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

    The participant with the id id.

    Sequence::to_repr

    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.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io