alef 0.25.37

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
// Ptr returns a pointer to the given value.
//
// Used by data DTOs to construct pointers for optional fields without the
// functional-options pattern boilerplate. For example:
//   &MyStruct{Field: Ptr("value"), OtherField: Ptr(42)}
func Ptr[T any](v T) *T {
	return &v
}