Unreleased APIs from PR #2. Not in 0.2.1. Stable 0.2.1 reference.
LOOM Unreleased (PR #2) / TEXT, MARKDOWN, AND EDITING
TextDocumentEntryID
IDs remain stable across insertions, removals of other entries, resizing, and collapse. Retain the ID returned by append/insert instead of treating rawValue as the current array index.
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
var document = TextDocument(width: 60)
let id: TextDocumentEntryID = document.append("A message")
_ = document.row(for: id)Members on this page
Feature guides and release status
TextDocumentEntryID
struct TextDocumentEntryIDConforms to: Swift.Equatable, Swift.Hashable, Swift.Sendable, Swift.SendableMetatype.
An identity that remains stable when entries before it change height or are removed.
Source · TextDocument.swift:5rawValue
let rawValue: IntUnderlying identifier, bit field, or enum representation; see the containing type.
Source · TextDocument.swift:6init(rawValue:)
init(rawValue: Int)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (1)
rawValue- Argument type and any default are shown in the declaration; see the behavior notes above.