Sign in

    moonrockz/diagrams-plantuml/yaml does not have a README file

    Content

    pub(all) enum Content {
    Dash
    Item(Scalar)
    Text(Scalar)
    Pair(Bool, Scalar, Entry)
    } derive(Eq,
    Debug
    )

    The content of one native YAML line.

    Content::equal

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

    Content::not_equal

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

    Content::to_repr

    Conversion

    pub struct Conversion {
    tree :
    DataTree
    ?
    diagnostics : ReadOnlyArray[
    Diagnostic
    ]
    }

    The result of converting a document to a data tree.

    Document

    pub struct Document {
    name : String?
    statements : ReadOnlyArray[
    Statement
    ]
    highlights : ReadOnlyArray[
    Selector
    ]
    lines : ReadOnlyArray[Line]
    } derive(Eq,
    Debug
    )

    One parsed YAML diagram block: the native line forms in source order. Comment-only and blank lines are trivia; block content lines belong to their key: | line.

    Document::equal

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

    Document::logical_equal

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

    Compare two documents without spans and source spellings.

    Document::new

    A document. The constructor copies its arrays.

    Document::not_equal

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

    Document::to_repr

    Entry

    pub(all) enum Entry {
    Empty
    Value(Scalar)
    Flow(ReadOnlyArray[String])
    Block(ReadOnlyArray[String])
    Folded
    } derive(Eq,
    Debug
    )

    The part of a key: line after the colon.

    Entry::equal

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

    Entry::not_equal

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

    Entry::to_repr

    Line

    pub struct Line {
    indent : Int
    content : Content
    span :
    Span
    ?
    } derive(Eq,
    Debug
    )

    One native YAML line. indent is the number of leading spaces, with a tab counted as four spaces, before any - .

    Line::equal

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

    Line::logical_equal

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

    Compare two lines without spans and source spellings.

    Line::native_indent

    fn Line::native_indent(self : Line) -> Int

    The indentation that the native profile compares: the column after - for a list item, one more than the dash for a lone -.

    Line::new

    fn Line::new(indent : Int, content : Content) -> Line

    Line::not_equal

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

    Line::to_repr

    ReadResult

    pub struct ReadResult {
    nodes : Array[
    Node
    ]
    document : Document?
    diagnostics : ReadOnlyArray[
    Diagnostic
    ]
    }

    The result of reading a YAML body.

    Scalar

    pub struct Scalar {
    text : String
    raw : String?
    } derive(Eq,
    Debug
    )

    A scalar of the native YAML profile. text is the value after the profile removes one pair of matching outer quotes; there is no escape processing. raw is the source spelling, or None for a constructed value. Logical comparison and canonical writing use only text.

    Scalar::equal

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

    Scalar::new

    fn Scalar::new(text : String) -> Scalar

    Scalar::not_equal

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

    Scalar::to_repr

    diagnostic_codes

    let diagnostic_codes : ReadOnlyArray[String]

    The stable diagnostic codes of the YAML reader, writer and converter.

    java_trim

    fn java_trim(text : String) -> String

    The text without leading and trailing code units up to U+0020, as Java String.trim gives.
    fn print_body(document : Document, limits? :
    Limits
    ) -> Result[String, ReadOnlyArray[
    Diagnostic
    ]]

    Write the canonical body of a YAML block from the typed lines: one #highlight line for each selector, then each line with its indentation, the first scalar spelling that reads back to the same value, and no comments or blank lines. Every line ends with a line break. The text has no block markers and no shared statements. A value that the native profile cannot express gives an error; there is no partial output and no source fallback.

    read

    Read the YAML body of a scanned block with the pinned native line rules. Reading keeps every line form, including forms that conversion refuses, such as folded text. A key: | line takes the following lines that are text, comments or deeper than the key; blank lines are not content, as upstream removes them before the YAML parser runs. Tabs count as four spaces. Comments are # outside quotes, or # at the start.

    to_data_tree

    fn to_data_tree(document : Document, id? : String, limits? :
    Limits
    ) -> Conversion

    Convert a YAML document to a structured-data model with the scalar policy of PlantUML 1.2026.9: every scalar is text, so enabled: true gives the text true. Anchors, aliases and tags stay literal text. A repeated key keeps the last value at the first position, with a warning; the document keeps every occurrence. Input that the pinned profile refuses gives an error and no tree. Identities come from ordered ownership paths, as in the JSON converter. The title is the last title statement.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io