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 Struct

FullPtrCastFlags

Public Struct
std.zig.Zir.Inst.FullPtrCastFlags
pub const FullPtrCastFlags = packed struct(u5)

Fields

ptr_cast: bool = false
align_cast: bool = false
addrspace_cast: bool = false
const_cast: bool = false
volatile_cast: bool = false

Functions

pub inline fn needResultTypeBuiltinName(flags: FullPtrCastFlags) []const u8

File

zig/Zir.zig:3606
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
    pub const FullPtrCastFlags = packed struct(u5) {
        ptr_cast: bool = false,
        align_cast: bool = false,
        addrspace_cast: bool = false,
        const_cast: bool = false,
        volatile_cast: bool = false,

        pub inline fn needResultTypeBuiltinName(flags: FullPtrCastFlags) []const u8 {
            if (flags.ptr_cast) return "@ptrCast";
            if (flags.align_cast) return "@alignCast";
            if (flags.addrspace_cast) return "@addrSpaceCast";
            unreachable;
        }
    }