tiny.http.ResponseCapacity
Defined in tiny.http.
API (8)
Actions
Public operations.
Fields and members
Public fields and members.
head_byteshead_bytes_per_responseheader_bytesheader_countheader_count_per_responseresponse_countstorage_bytes
Source
Source: lib/http/src/response.zig:53
zig
pub const Capacity = struct { response_count: usize, header_count_per_response: usize, head_bytes_per_response: usize, header_count: usize, header_bytes: usize, head_bytes: usize, storage_bytes: usize, pub fn derive(limits: Limits) error{CapacityOverflow}!Capacity { const header_count = try alloc_phase.capacity.mul( usize, limits.response_count, limits.header_count_per_response, ); const header_bytes = try alloc_phase.capacity.mul( usize, header_count, @sizeOf(Header), ); const head_bytes = try alloc_phase.capacity.mul( usize, limits.response_count, limits.head_bytes_per_response, ); const storage_bytes = try alloc_phase.capacity.add( usize, header_bytes, head_bytes, ); return .{ .response_count = limits.response_count, .header_count_per_response = limits.header_count_per_response, .head_bytes_per_response = limits.head_bytes_per_response, .header_count = header_count, .header_bytes = header_bytes, .head_bytes = head_bytes, .storage_bytes = storage_bytes, }; }};Source: lib/http/src/root.zig:52
zig
pub const ResponseCapacity = response.Capacity;Audit
| Definitions | 2 |
|---|---|
| Public names | 2 |
| Members | 7 |
| Version | 26.7.0 |
| Revision | daab053ee433 |