Record

zio.blocks.schema.binding.Binding.Record
See theRecord companion object
final case class Record[A](constructor: Constructor[A], deconstructor: Deconstructor[A]) extends Binding[Record, A]

The binding of a record node, such as a case class. constructor builds a value from Registers, and deconstructor writes a value's fields into them.

Both must use the layout that Reflect.Record#registers computes from the node's fields. In field order, a field stored as a Boolean, Byte, Short, Char, Int, Float, Long or Double takes the next position of its size in the byte area, a Unit field takes no space, and every other field takes the next object slot (see Register). Reflect.Record#fromDynamicValue and #toDynamicValue move each field through that layout, so a binding with a different layout reads the wrong registers.

Attributes

Companion
object
Source
Binding.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Binding[Record, A]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala