Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Type Function

LengthPrefixedList

Public Type Function
std.Build.Configuration.Storage.LengthPrefixedList
pub fn LengthPrefixedList(comptime ElemArg: type) type

The field contains a u32 length followed by that many items. Each element needs well-defined memory layout but can otherwise be any multiple of u32 length. The length is number of elements, not the number of u32s.

Fields

slice: []const Elem

Values

Functions

pub fn initErased(s: []const u32) @This()

File

Build/Configuration.zig:2657
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
    pub fn LengthPrefixedList(comptime ElemArg: type) type {
        return struct {
            slice: []const Elem,

            pub const storage: Storage = .length_prefixed_list;
            pub const Elem = ElemArg;

            pub fn initErased(s: []const u32) @This() {
                return .{ .slice = @ptrCast(s) };
            }
        };
    }