tiny.zen.AsciiRenderCapacity
Defined in tiny.zen.
API (9)
Actions
Public operations.
Fields and members
Public fields and members.
canvas_offsetcategories_offsetcategory_byteslimitsoutput_offsetstack_total_bytesstack_totals_offsetstorage_bytes
Source
Source: lib/zen/src/diagram/ascii/capacity.zig:14
zig
pub const Capacity = struct { limits: Limits, categories_offset: usize, category_bytes: usize, stack_totals_offset: usize, stack_total_bytes: usize, canvas_offset: usize, output_offset: usize, storage_bytes: usize, pub fn derive(limits: Limits) DeriveError!Capacity { const category_bytes = try multiplied(limits.max_categories, @sizeOf([]const u8)); const stack_totals_offset = try aligned(category_bytes, @alignOf(diagram.bounds.StackTotal)); const stack_total_bytes = try multiplied( limits.max_stack_totals, @sizeOf(diagram.bounds.StackTotal), ); const canvas_offset = try added(stack_totals_offset, stack_total_bytes); const output_offset = try added(canvas_offset, limits.max_canvas_bytes); return .{ .limits = limits, .categories_offset = 0, .category_bytes = category_bytes, .stack_totals_offset = stack_totals_offset, .stack_total_bytes = stack_total_bytes, .canvas_offset = canvas_offset, .output_offset = output_offset, .storage_bytes = try added(output_offset, limits.max_output_bytes), }; }};Source: lib/zen/src/root.zig:69
zig
/// Checked one-region byte layout derived from `AsciiRenderLimits`.pub const AsciiRenderCapacity = diagram.AsciiRenderCapacity;Also reachable as
diagram.AsciiRenderCapacity, diagram.ascii.RenderCapacity.
Audit
| Definitions | 2 |
|---|---|
| Public names | 6 |
| Members | 8 |
| Version | 26.7.0 |
| Revision | daab053ee433 |