Optional

kantan.codecs.Optional
See theOptional companion object
trait Optional[A] extends Serializable

Type class that represents data types that have an "empty" value.

The purpose of this type class is to allow automatic derivation of Decoder for decoded types that might not have a value - Option, List...

In theory, there should rarely be a need to interact directly with this type class, and one is usually better served by obtaining the Decoder instance for Option and mapping on it.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def empty: A

Concrete methods

def isEmpty(a: A): Boolean