Pdef
nscn.polaris2.pdefgen.Pdef
case class Pdef(name: String, customTypeDefs: VectorMap[String, PdefCustomTypeDef], fields: VectorMap[String, PdefField])
A validated .pdef: the custom types it declares plus its top-level fields, which become a struct called name.
Both maps are insertion-ordered on purpose. A pdef describes a flat binary layout, so the declaration order of the top-level fields IS the wire order - reordering them silently produces a codec that decodes the wrong bytes into the wrong fields. The type defs are ordered for the weaker reason that generated sources should be stable across runs, so an unchanged .pdef does not invalidate downstream build caches.
Keying by name is only lossless because PdefValidator has already rejected duplicate names: a repeated key would silently replace the earlier field.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article