CustomStructSchema
constructor(type: String, componentNames: List<String>, componentSchemas: List<FateSchema<*>>, encoder: (T) -> List<Any>)
Creates a new CustomStructSchema with the specified configuration
Parameters
T
The type of objects this schema can serialize
type
A string identifier for this object type, written to the log for identification
componentNames
Names of the components in serialization order. Used for schema documentation.
componentSchemas
Schemas for each component, must match the order of componentNames
encoder
Function that converts objects of type T into a list of primitive components