Published release 0.2.1. Unreleased PR #2 reference.
LOOM 0.2.1 / RENDERING, VIEWPORTS, AND COMPOSITION
LayoutCache
A caller-owned bounded least-recently-used layout cache.
No global state is retained.
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.
Members on this page
Feature guides and release status
LayoutCache
struct LayoutCacheConforms to: Swift.Sendable, Swift.SendableMetatype.
A caller-owned bounded least-recently-used layout cache.
No global state is retained.
Source · LayoutCache.swift:14capacity
let capacity: IntA public field of this type. Its value type and mutability are shown in the declaration.
Source · LayoutCache.swift:15count
var count: Int { get }A public field of this type. Its value type and mutability are shown in the declaration.
Source · LayoutCache.swift:16init(capacity:)
init(capacity: Int = 128)Creates a value with the supplied arguments. Default arguments are shown in the declaration.
Parameters (1)
capacity- Argument type and any default are shown in the declaration; see the behavior notes above.
removeAll()
mutating func removeAll()Removes all retained layout results.
Source · LayoutCache.swift:29split(_:area:)
mutating func split(_ layout: Layout, area: Rect) -> [Rect]Includes every layout field and the complete input rectangle in the key.
Parameters (2)
layout- Argument type and any default are shown in the declaration; see the behavior notes above.
area- Assigned absolute terminal-cell rectangle.
Returns [Rect].