Optional
morphling.Optional
final case class Optional[O, F[_], I](fieldName: String, base: F[I], extract: Extract[O, Option[I]]) extends PropSchema[O, F, Option[I]]
Class describing an optional property of a record. Since in many serialized forms optional properties may be omitted entirely from the serialized form, a distinct type is needed in order to be able to correctly interpret the absence of a field.
Value parameters
- base
-
Schema for the property's value type.
- extract
-
Extract lens from the record type to the property.
- fieldName
-
The name of the property.
Attributes
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article