tiny.wayland.ClientIdCapacity
Defined in ids.
API (5)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/wayland/src/ids.zig:18
zig
pub const Capacity = struct { client_id_count: usize, state_bytes: usize, reusable_id_bytes: usize, total_requested_bytes: usize, pub fn derive(limits: Limits) CapacityError!Capacity { if (limits.client_id_count > maximum_client_id_count) { return error.ClientIdStorageTooLarge; } const state_bytes = std.math.mul( usize, limits.client_id_count, @sizeOf(State), ) catch return error.CapacityOverflow; const reusable_id_bytes = std.math.mul( usize, limits.client_id_count, @sizeOf(u32), ) catch return error.CapacityOverflow; const total_requested_bytes = std.math.add( usize, state_bytes, reusable_id_bytes, ) catch return error.CapacityOverflow; return .{ .client_id_count = limits.client_id_count, .state_bytes = state_bytes, .reusable_id_bytes = reusable_id_bytes, .total_requested_bytes = total_requested_bytes, }; }};Source: lib/wayland/src/root.zig:78
zig
pub const ClientIdCapacity = ids.Capacity;Audit
| Definitions | 2 |
|---|---|
| Public names | 4 |
| Members | 4 |
| Version | 26.7.0 |
| Revision | daab053ee433 |