GetStructHash returns the struct hash for a given type using the provided TypeResolver. This is used by codegen serializers to get the hash at runtime.
(type_ reflect.Type, resolver *TypeResolver)
| 29 | // GetStructHash returns the struct hash for a given type using the provided TypeResolver. |
| 30 | // This is used by codegen serializers to get the hash at runtime. |
| 31 | func GetStructHash(type_ reflect.Type, resolver *TypeResolver) int32 { |
| 32 | ser := newStructSerializer(type_, "") |
| 33 | if err := ser.initialize(resolver); err != nil { |
| 34 | panic(fmt.Errorf("failed to initialize struct serializer for hash computation: %v", err)) |
| 35 | } |
| 36 | return ser.structHash |
| 37 | } |
| 38 | |
| 39 | // initialize performs eager initialization of the struct serializer. |
| 40 | // This should be called at registration time to pre-compute all field metadata. |
nothing calls this directly
no test coverage detected