bobzhang/atd/format does not have a README file

    BoxType

    pub(all) enum BoxType {
    HBox
    VBox
    HVBox
    HOVBox
    Box
    Fits
    } derive(Eq,
    Debug
    )

    Kinds of pretty-printing boxes.

    Formatter

    type Formatter

    A pretty-printer writing into an internal buffer.

    Formatter::close_box

    fn Formatter::close_box(self : Formatter) -> Unit

    Close the most recently opened box.

    Formatter::contents

    fn Formatter::contents(self : Formatter) -> String

    Return the text printed so far (call print_flush first).

    Formatter::force_newline

    fn Formatter::force_newline(self : Formatter) -> Unit

    Force a newline in the current box.

    Formatter::new

    fn Formatter::new(margin? : Int) -> Formatter

    Create a new formatter with the default OCaml settings (margin 78, minimum space left 10).

    Formatter::open_box

    fn Formatter::open_box(self : Formatter, indent : Int) -> Unit

    Open a structural compacting box.

    Formatter::open_hbox

    fn Formatter::open_hbox(self : Formatter) -> Unit

    Open a horizontal box.

    Formatter::open_hovbox

    fn Formatter::open_hovbox(self : Formatter, indent : Int) -> Unit

    Open a horizontal-or-vertical compacting box.

    Formatter::open_hvbox

    fn Formatter::open_hvbox(self : Formatter, indent : Int) -> Unit

    Open a horizontal/vertical box.

    Formatter::open_vbox

    fn Formatter::open_vbox(self : Formatter, indent : Int) -> Unit

    Open a vertical box.

    Formatter::print_as

    fn Formatter::print_as(self : Formatter, size : Int, s : String) -> Unit

    Print a string, pretending that its width is size.

    Formatter::print_break

    fn Formatter::print_break(self : Formatter, width : Int, offset : Int) -> Unit

    Break hint: width spaces if the line is not split, otherwise a newline with offset added to the indentation of the box.

    Formatter::print_char

    fn Formatter::print_char(self : Formatter, c : Char) -> Unit

    Print a single character.

    Formatter::print_custom_break

    fn Formatter::print_custom_break(self : Formatter, fits~ : (String, Int, String), breaks~ : (String, Int, String)) -> Unit

    Generalized break hint.

    Formatter::print_cut

    fn Formatter::print_cut(self : Formatter) -> Unit

    Break hint printing nothing if the line is not split.

    Formatter::print_flush

    fn Formatter::print_flush(self : Formatter) -> Unit

    Flush all pending material.

    Formatter::print_newline

    fn Formatter::print_newline(self : Formatter) -> Unit

    Flush all pending material and print a newline.

    Formatter::print_space

    fn Formatter::print_space(self : Formatter) -> Unit

    Break hint printing a space if the line is not split.

    Formatter::print_string

    fn Formatter::print_string(self : Formatter, s : String) -> Unit

    Print a string whose width is its UTF-8 byte length.

    Formatter::set_margin

    fn Formatter::set_margin(self : Formatter, n : Int) -> Unit

    Set the right margin, like OCaml's Format.pp_set_margin.

    utf8_length

    fn utf8_length(s : StringView) -> Int

    Length of a string in UTF-8 bytes, matching OCaml's String.length.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io