StructSchemaBuilder

Declares the fields of a struct. See structSchema.

Functions

Link copied to clipboard
fun boolean(name: String, get: (T) -> Boolean)

Declares a bool field, packed as one byte.

Link copied to clipboard
fun float32(name: String, get: (T) -> Float)

Declares a float32 field.

Link copied to clipboard
fun float64(name: String, get: (T) -> Double)

Declares a float64 field.

Link copied to clipboard
fun float64Array(name: String, length: Int, get: (T) -> DoubleArray)

Declares a fixed-size float64 array field of length elements.

Link copied to clipboard
fun int16(name: String, get: (T) -> Short)

Declares an int16 field.

Link copied to clipboard
fun int32(name: String, get: (T) -> Int)

Declares an int32 field.

Link copied to clipboard
fun int64(name: String, get: (T) -> Long)

Declares an int64 field.

Link copied to clipboard
fun int8(name: String, get: (T) -> Byte)

Declares an int8 field.

Link copied to clipboard
fun <N> struct(name: String, schema: StructSchema<N>, get: (T) -> N)

Declares a field whose value is another struct, packed inline.