tiny.http.ClientResponseCapacity
Defined in tiny.http.
API (10)
Actions
Public operations.
Fields and members
Public fields and members.
body_bytesbody_bytes_per_responsehead_byteshead_bytes_per_responseheader_bytesheader_countheader_count_per_responseresponse_countstorage_bytes
Source
Source: lib/http/src/client/response.zig:23
zig
pub const Capacity = struct { response_count: usize, header_count_per_response: usize, head_bytes_per_response: usize, body_bytes_per_response: usize, header_count: usize, header_bytes: usize, head_bytes: usize, body_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 body_bytes = try alloc_phase.capacity.mul( usize, limits.response_count, limits.body_bytes_per_response, ); const header_and_head_bytes = try alloc_phase.capacity.add( usize, header_bytes, head_bytes, ); const storage_bytes = try alloc_phase.capacity.add( usize, header_and_head_bytes, body_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, .body_bytes_per_response = limits.body_bytes_per_response, .header_count = header_count, .header_bytes = header_bytes, .head_bytes = head_bytes, .body_bytes = body_bytes, .storage_bytes = storage_bytes, }; }};Source: lib/http/src/root.zig:96
zig
pub const ClientResponseCapacity = client.ResponseCapacity;Audit
| Definitions | 2 |
|---|---|
| Public names | 2 |
| Members | 9 |
| Version | 26.7.0 |
| Revision | daab053ee433 |