Function sentinel [src]

Loads the pointer type's sentinel value from sentinel_ptr. Returns null if the pointer type has no sentinel.

Prototype

pub inline fn sentinel(comptime ptr: Pointer) ?ptr.child

Parameters

ptr: Pointer

Source

pub inline fn sentinel(comptime ptr: Pointer) ?ptr.child { const sp: *const ptr.child = @ptrCast(@alignCast(ptr.sentinel_ptr orelse return null)); return sp.*; }