tiny.zen.SitePathPlan
Defined in tiny.zen.
API (5)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/zen/src/site/path/plan.zig:16
zig
pub const Plan = struct { target_path_bytes: usize, public_path_bytes: usize, pub fn inspect( relative_path: []const u8, clean_urls: bool, kind: model.PublicKind, limits: Limits, ) model.Error!Plan { const target_path_bytes = try transform.targetLength(relative_path, clean_urls); const result = Plan{ .target_path_bytes = target_path_bytes, .public_path_bytes = try transform.publicLength(target_path_bytes, clean_urls, kind), }; try result.require(limits); return result; } pub fn exactLimits(self: Plan) Limits { return .{ .max_target_path_bytes = self.target_path_bytes, .max_public_path_bytes = self.public_path_bytes, }; } pub fn require(self: Plan, limits: Limits) model.Exhaustion!void { if (self.target_path_bytes > limits.max_target_path_bytes) { return error.SiteTargetPathCapacityExceeded; } if (self.public_path_bytes > limits.max_public_path_bytes) { return error.SitePublicPathCapacityExceeded; } }};Source: lib/zen/src/root.zig:324
zig
/// Exact transformed site-path demand measured before storage acquisition.pub const SitePathPlan = site_path.Plan;Also reachable as
Audit
| Definitions | 4 |
|---|---|
| Public names | 8 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |