Published release 0.2.1. Unreleased PR #2 reference.
LOOM 0.2.1 / RENDERING AND LAYOUT
Cell
A normal blank cell is a space of width 1 with default style and no link. Width 2 starts a wide grapheme; width 0 is its trailing continuation. Mutating cells directly bypasses Buffer.put validation and wide-cell cleanup.
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:4symbol
var symbol: StringThe visible grapheme or symbol string.
Source · Cell.swift:5width
var width: Int0 marks the trailing cell of a two-column grapheme.
Source · Cell.swift:8style
var style: StyleVisual attributes used when painting this value.
Source · Cell.swift:9link
var link: String?Optional hyperlink destination; terminal emission also requires hyperlinks enabled on the renderer.
Source · Cell.swift:10init(symbol:width:style:link:)
init(symbol: String = " ", width: Int = 1, style: Style = Style(), link: String? = nil)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (4)
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.