Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.
LOOM Unreleased (PR #2) / RENDERING AND LAYOUT
Cell
A blank is a one-cell space with default appearance. Zero width marks a continuation; positive width marks a complete leading span. Ordinary text uses Unicode measurement. Specialized diff policies are explicit and retain complete footprints. Prefer Buffer.put to direct mutation, which bypasses validation.
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 cell = Cell(symbol: "A", style: Style(bold: true))
_ = cell.widthMembers on this page
Feature guides and release status
Cell
struct CellConforms to: Swift.Equatable, Swift.Sendable, Swift.SendableMetatype.
One terminal cell, including continuation cells for wide graphemes.
Source · Cell.swift:17symbol
var symbol: StringThe visible grapheme or symbol string.
Source · Cell.swift:18width
var width: Int0 marks a continuation cell; positive widths mark leading cells.
Source · Cell.swift:21style
var style: StyleVisual attributes used when painting this value.
Source · Cell.swift:22link
var link: String?Optional hyperlink destination; terminal emission also requires hyperlinks enabled on the renderer.
Source · Cell.swift:23diffPolicy
var diffPolicy: CellDiffPolicyA public field of this type. Its value type and mutability are shown in the declaration.
Source · Cell.swift:24init(symbol:width:style:link:diffPolicy:)
init(symbol: String = " ", width: Int = 1, style: Style = Style(), link: String? = nil, diffPolicy: CellDiffPolicy = .automatic)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (5)
symbol- Argument type and any default are shown in the declaration; see the behavior notes above.
width- Available columns in terminal cells.
style- Text/cell appearance.
link- Argument type and any default are shown in the declaration; see the behavior notes above.
diffPolicy- Argument type and any default are shown in the declaration; see the behavior notes above.