class Garzon(h.Struct): arr = h.Array(field_type=h.UInt8(3), length=3, value=(1, 2), fill=True) nested_vla_len = h.UInt16() nested_vla = h.Vector(field_type=h.Int32(), length=nested_vla_len, value=(9, 10, 100)) x = h.UInt8(5)
class Gilad(h.Struct): i8 = h.Int8(0) i16 = h.Int16(0) i32 = h.Int32(0) i64 = h.Int64(0) u8 = h.UInt8(0) u16 = h.UInt16(0) u32 = h.UInt32(0) u64 = h.UInt64(0) flt = h.Float(0) dub = h.Double(0)
class Good(h.Struct): i32 = h.Int32(5, validator=lambda z: z > 4) i32_range = h.Int32(14, validator=range(0, 30, 2)) i32_set = h.Int32(2, validator={1, 2, 3}) i32_arr = h.Array(length=5, field_type=h.UInt8(5), validator=5)