tiny.zen.SiteCatalogDemand
Defined in tiny.zen.
API (7)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/zen/src/site/catalog/plan.zig:15
zig
pub const Demand = struct { relative_path_bytes: usize, url_bytes: usize, title_bytes: usize, date_bytes: usize, type_label_bytes: usize, pub fn fromInput(input: model.EntryInput) Demand { const demand = Demand{ .relative_path_bytes = input.relative_path.len, .url_bytes = input.url.len, .title_bytes = input.title.len, .date_bytes = input.date.len, .type_label_bytes = input.type_label.len, }; std.debug.assert(demand.relative_path_bytes == input.relative_path.len); std.debug.assert(demand.url_bytes == input.url.len); std.debug.assert(demand.title_bytes == input.title.len); std.debug.assert(demand.date_bytes == input.date.len); std.debug.assert(demand.type_label_bytes == input.type_label.len); return demand; } pub fn textBytes(self: Demand) error{CapacityOverflow}!usize { var total = try added(self.relative_path_bytes, self.url_bytes); std.debug.assert(total >= self.relative_path_bytes); std.debug.assert(total >= self.url_bytes); total = try added(total, self.title_bytes); std.debug.assert(total >= self.title_bytes); total = try added(total, self.date_bytes); std.debug.assert(total >= self.date_bytes); const result = try added(total, self.type_label_bytes); std.debug.assert(result >= self.type_label_bytes); return result; }};Source: lib/zen/src/root.zig:280
zig
/// Byte demand contributed by one site catalog entry.pub const SiteCatalogDemand = site_catalog.Demand;Also reachable as
Audit
| Definitions | 3 |
|---|---|
| Public names | 6 |
| Members | 5 |
| Version | 26.7.0 |
| Revision | daab053ee433 |