Published release 0.2.1. Unreleased PR #2 reference.
LOOM 0.2.1 / TERMINAL ALIASES FROM WEFT
ANSIBackend
Writes ANSI bytes to standard output and throws TerminalError.outputFailed on a failed write. It does not open raw mode or own a terminal session.
loom.ANSIBackend is an alias for weft.ANSIBackend. It is available through import loom. The underlying type’s members are documented here.
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
let backend = ANSIBackend()
_ = Terminal(backend: backend, width: 80, height: 24)Members on this page
Feature guides and release status
ANSIBackend
typealias ANSIBackend = weft.weft.ANSIBackendWrites ANSI bytes to standard output and throws TerminalError.outputFailed on a failed write. It does not open raw mode or own a terminal session.
Source · TerminalExports.swift:7Underlying weft API
ANSIBackend
struct ANSIBackendConforms to: Backend.
Writes ANSI terminal output to standard output.
Source · ANSIBackend.swift:4init()
init()Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Source · ANSIBackend.swift:5write(_:)
mutating func write(_ data: Data) throwsWrites every byte in order to standard output or throws an output error. Does not own the terminal session.
Parameters (1)
data- Bytes to write in order.