pub fn asBytes(ptr: anytype) AsBytesReturnType(@TypeOf(ptr))
Given a pointer to a single item, returns a slice of the underlying bytes, preserving pointer attributes.
ptr
4383 4384 4385
pub fn asBytes(ptr: anytype) AsBytesReturnType(@TypeOf(ptr)) { return @ptrCast(@alignCast(ptr)); }
Given a pointer to a single item, returns a slice of the underlying bytes, preserving pointer attributes.