Documentation
¶
Overview ¶
Package unsafecast provides utilties for performing unsafe type casts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Slice ¶
func Slice[From, To any](in []From) []To
Slice reinterprets a slice of one type as a slice of another type. Slice does not perform any type conversion or validation; it simply reinterprets the underlying memory.
The length and capacity of the output slice are scaled according to the sizes of the From and To types.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.