ToonEx.Encode.Writer (toon_ex v1.3.1)

Copy Markdown View Source

Writer for building TOON output incrementally with efficient indentation handling.

Summary

Types

t()

@type t() :: %ToonEx.Encode.Writer{
  indent_cache: map(),
  indent_string: String.t(),
  lines: [iodata()]
}

Functions

empty?(writer)

line_count(writer)

new(indent_size \\ 2)

push(w, content, depth)

push_many(w, lines, depth)

to_iodata(w)

@spec to_iodata(t()) :: iodata()

to_lines(writer)

@spec to_lines(t()) :: [iodata()]

to_string(w)

@spec to_string(t()) :: String.t()