Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CastTo ¶
func CastTo[T, F constraints.Integer](from F) T
CastTo casts one integer type to another without bounds checking
func MustSafeCastTo ¶
func MustSafeCastTo[T, F constraints.Integer](from F) T
MustSafeCastTo casts one integer type to another with bounds checking and panics in case of overflow
func SafeCastTo ¶
func SafeCastTo[T, F constraints.Integer](from F) (T, error)
CastTo casts one integer type to another with bounds checking and returns error in case of overflow
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.