tiny.zen.SitePagePlan
Defined in tiny.zen.
API (4)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/zen/src/site/page/plan.zig:9
zig
pub const Plan = struct { max_page_bytes: usize = 0, pub fn inspect(file_bytes: u64, limits: Limits) model.Error!Plan { var plan: Plan = .{}; try plan.observe(file_bytes, limits); return plan; } pub fn observe(self: *Plan, file_bytes: u64, limits: Limits) model.Error!void { const exact = std.math.cast(usize, file_bytes) orelse return error.SitePageCapacityExceeded; if (exact > limits.max_page_bytes) return error.SitePageCapacityExceeded; self.max_page_bytes = @max(self.max_page_bytes, exact); } pub fn exactLimits(self: Plan) Limits { return .{ .max_page_bytes = self.max_page_bytes }; }};Source: lib/zen/src/root.zig:304
zig
/// Accumulates the largest admitted Markdown page size.pub const SitePagePlan = site_page.Plan;Also reachable as
Audit
| Definitions | 4 |
|---|---|
| Public names | 8 |
| Members | 1 |
| Version | 26.7.0 |
| Revision | daab053ee433 |