Wrapper
zio.blocks.schema.binding.Binding.Wrapper
The binding of a wrapper node, which stores a value of type A as the value of type B inside it, such as a newtype or the result of Schema#transform. wrap builds an A from a B, and unwrap returns the B inside an A.
wrap rejects a B by throwing. Reflect#fromDynamicValue and the JSON codec catch a non-fatal exception from it and report it as a decoding error.
Type parameters
- A
-
the wrapper type
- B
-
the wrapped type
Attributes
- Source
- Binding.scala
- Graph
-
- Supertypes
Members list
In this article