Published release 0.2.1. Unreleased PR #2 reference.
LOOM 0.2.1 / RENDERING, VIEWPORTS, AND COMPOSITION
ANSIRenderBackend
Encodes semantic rendering operations as ANSI bytes for a weft output sink.
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.
Members on this page
Feature guides and release status
ANSIRenderBackend
struct ANSIRenderBackend<B> where B : BackendConforms to: RenderBackend.
Encodes semantic rendering operations as ANSI bytes for a weft output sink.
Source · ANSIRenderBackend.swift:5backend
var backend: B { get }The output backend retained by the terminal; externally read-only.
Source · ANSIRenderBackend.swift:6init(backend:synchronizedOutput:colorDepth:hyperlinks:)
init(backend: B, synchronizedOutput: Bool = true, colorDepth: TerminalColorDepth = .trueColor, hyperlinks: Bool = false)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (4)
backend- Destination that writes terminal bytes or throws.
synchronizedOutput- Argument type and any default are shown in the declaration; see the behavior notes above.
colorDepth- Argument type and any default are shown in the declaration; see the behavior notes above.
hyperlinks- Argument type and any default are shown in the declaration; see the behavior notes above.
reset()
mutating func reset()Discards encoder assumptions. It does not clear the physical terminal or close a session.
Source · ANSIRenderBackend.swift:17render(_:)
mutating func render(_ update: RenderUpdate) throws -> RenderStatsEncodes a semantic frame or insertion, writes its ANSI bytes, and returns counters. Throws on output failure, which may be partial.
Parameters (1)
update- Argument type and any default are shown in the declaration; see the behavior notes above.
Returns RenderStats.