loom & weft
Made for Swift.

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.width
Members on this page

Feature guides and release status

Cell

Structure
struct Cell

Conforms to: Swift.Equatable, Swift.Sendable, Swift.SendableMetatype.

One terminal cell, including continuation cells for wide graphemes.

Source · Cell.swift:17

symbol

Instance Property
var symbol: String

The visible grapheme or symbol string.

Source · Cell.swift:18

width

Instance Property
var width: Int

0 marks a continuation cell; positive widths mark leading cells.

Source · Cell.swift:21

style

Instance Property
var style: Style

Visual attributes used when painting this value.

Source · Cell.swift:22

diffPolicy

Instance Property
var diffPolicy: CellDiffPolicy

A public field of this type. Its value type and mutability are shown in the declaration.

Source · Cell.swift:24