tiny.css.Capacity
Defined in sheet.
The aligned byte layout one Limits produces.
API (4)
Actions
Public operations.
derive: Lays the arrays out in declaration order, failing closed on overflow.
Fields and members
Public fields and members.
Source
Source: lib/css/src/sheet.zig:163
zig
/// The aligned byte layout one `Limits` produces.pub const Capacity = struct { limits: Limits = .{}, offsets: [array_count]usize = @splat(0), total_bytes: usize = 0, /// Lays the arrays out in declaration order, failing closed on overflow. pub fn derive(limits: Limits) error{CapacityOverflow}!Capacity { var out = Capacity{ .limits = limits }; var cursor: usize = 0; inline for (arrays, 0..) |entry, index| { const region = try placed(entry.Element, cursor, @field(limits, entry.name)); out.offsets[index] = region.start; cursor = region.end; } out.total_bytes = cursor; return out; }};Source: lib/css/src/root.zig:47
zig
pub const Capacity = sheet.Capacity;Audit
| Definitions | 2 |
|---|---|
| Public names | 4 |
| Members | 3 |
| Version | 26.7.0 |
| Revision | daab053ee433 |