ununsafe

package module
v0.0.0-...-1362d4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 2 Imported by: 0

README

ununsafe

Go Reference Go Report Card Test

A slightly safer version of unsafe.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToString

func BytesToString(b []byte) string

BytesToString converts []byte to string without copy.

func SizeOf

func SizeOf[T any]() uint64

SizeOf is a wrapper of unsafe.Sizeof.

func SliceToSlice

func SliceToSlice[From, To any](arr []From) []To

func SliceToValue

func SliceToValue[From, To any](arr []From) To

func StringToBytes

func StringToBytes(s string) []byte

StringToBytes converts string to []byte without copy.

func ValueToSlice

func ValueToSlice[From, To any](from From) []To

func ValueToValue

func ValueToValue[From, To any](from From) To

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL