MCPcopy Create free account
hub / github.com/apache/fory / validateUserTypeID

Function validateUserTypeID

go/fory/fory.go:259–264  ·  view source on GitHub ↗

go:noinline

(typeID uint32)

Source from the content-addressed store, hash-verified

257
258//go:noinline
259func validateUserTypeID(typeID uint32) error {
260 if typeID > maxUserTypeID {
261 return fmt.Errorf("typeID must be in range [0, 0xfffffffe], got %d", typeID)
262 }
263 return nil
264}
265
266// RegisterStruct registers a struct type with a numeric ID for cross-language serialization.
267// This is compatible with Java's fory.register(Class, int) method.

Callers 4

RegisterStructMethod · 0.85
RegisterUnionMethod · 0.85
RegisterEnumMethod · 0.85
RegisterExtensionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected