Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.
LOOM Unreleased (PR #2) / RENDERING AND LAYOUT
RenderStats
Rendering counters with a public initializer. ANSI changedCells counts visited changed cells (including continuations); bytes counts emitted UTF-8 bytes including controls. TestBackend reports physical changes, so its counts have different semantics. Counts are diagnostics, not performance guarantees.
Standard inherited Swift protocol operations such as synthesized equality and OptionSet set operations are not repeated. The public declarations below are extracted from the exact source revision listed in the coverage manifest.
Example
var terminal = Terminal(backend: ANSIBackend(), width: 10, height: 2)
let stats = try terminal.draw { _ in }
_ = (stats.changedCells, stats.bytes)Members on this page
Feature guides and release status
RenderStats
struct RenderStatsConforms to: Swift.Sendable, Swift.SendableMetatype.
The emitted cells (including requested redraws) and bytes in one rendering pass.
Source · RenderStats.swift:2changedCells
let changedCells: IntCount of differing cells visited by this encoding pass.
Source · RenderStats.swift:3bytes
let bytes: IntNumber of encoded UTF-8 output bytes.
Source · RenderStats.swift:4init(changedCells:bytes:)
init(changedCells: Int, bytes: Int)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (2)
changedCells- Argument type and any default are shown in the declaration; see the behavior notes above.
bytes- Input bytes to decode incrementally.