Skip to documentation
SLOP

tiny.wayland.ClientIdCapacity

Reference tiny.wayland ClientIdCapacity

Defined in ids.

API (5)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callsidsCapacity
Static calls · unresolved targets: unknown · external targets: unknown.

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;
Called byCallsNo direct callstest sourcelib.wayland.src.idstest: client ID capacity derives two ...test sourcelib.wayland.src.idstest: client ID max plus one preserve...test sourcelib.wayland.src.idstest: client ID storage is acquired b...test sourcelib.wayland.src.idstest: every allocated ID has infallib...ClientIdCapacityderive
Static calls · unresolved targets: 0 · external targets: 0.

Audit

Definitions2
Public names4
Members4
Version26.7.0
Revisiondaab053ee433