package collection
Type Members
- final class RecordSchema extends AnyRef
RecordSchema represents the declaration of a heterogeneous Record type, with Fields that are determined at runtime.
RecordSchema represents the declaration of a heterogeneous Record type, with Fields that are determined at runtime. A Field declares the static type of its associated values, so although the record itself is dynamic, field access is type-safe.
Given a RecordSchema declaration
schema, any number of Records of that schema can be obtained withschema.newRecord. The type that Scala assigns to this value is what Scala calls a "path-dependent type," meaning thatschema1.Recordandschema2.Recordname distinct types. The same is true of fields:schema1.Field[A]andschema2.Field[A]are distinct, and can only be used with the corresponding Record.