Provides an instance of CellEncoder[Option[A]] for any type A that has an instance of CellEncoder.
Provides an instance of CellEncoder[Option[A]] for any type A that has an instance of CellEncoder.
Some are encoded like the value they contain:
scala> CellEncoder[Option[Int]].encode(Some(123)) res1: String = 123
Non are encoded as the empty string:
scala> CellEncoder[Option[Int]].encode(None) res2: String = ""
Provides an instance of CellEncoder[Either[A, B]] for any type A and B that have instances of
CellEncoder.
Provides an instance of CellEncoder[Either[A, B]] for any type A and B that have instances of
CellEncoder.
Left are encoded as the value they contain:
scala> CellEncoder[Either[Int, Boolean]].encode(Left(123)) res1: String = 123
So are Right:
scala> CellEncoder[Either[Int, Boolean]].encode(Right(true)) res2: String = true
Turns existing StringEncoder instances into CellEncoder ones.
Turns existing StringEncoder instances into CellEncoder ones.
This provides support for most basic Scala types - Int, for example:
CellEncoder[Int].encode(123) res1: String = 123
All default CellEncoder instances.