Provides an instance of CellDecoder[Either[A, B]] for any type A and B that have instances of
CellDecoder.
Provides an instance of CellDecoder[Either[A, B]] for any type A and B that have instances of
CellDecoder.
// Left value scala> CellDecoder[Either[Int, Boolean]].decode("123") res1: DecodeResult[Either[Int, Boolean]] = Right(Left(123)) // Right value scala> CellDecoder[Either[Int, Boolean]].decode("true") res2: DecodeResult[Either[Int, Boolean]] = Right(Right(true))
Provides an instance of CellDecoder[Option[A]] for any type A that has an instance of CellDecoder.
Provides an instance of CellDecoder[Option[A]] for any type A that has an instance of CellDecoder.
// Non-empty value scala> CellDecoder[Option[Int]].decode("123") res1: DecodeResult[Option[Int]] = Right(Some(123)) // Empty value scala> CellDecoder[Option[Int]].decode("") res2: DecodeResult[Option[Int]] = Right(None)
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 encoding scala> CellEncoder[Option[Int]].encode(Some(123)) res1: String = 123 // None encoding 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 encoding scala> CellEncoder[Either[Int, Boolean]].encode(Left(123)) res1: String = 123 // Right encoding scala> CellEncoder[Either[Int, Boolean]].encode(Right(true)) res2: String = true
Turns existing StringDecoder instances into CellDecoder ones.
Turns existing StringDecoder instances into CellDecoder ones.
This provides support for most basic Scala types.
scala> CellDecoder[Int].decode("123") res1: DecodeResult[Int] = Right(123)
Turns existing StringEncoder instances into CellEncoder ones.
Turns existing StringEncoder instances into CellEncoder ones.
This provides support for most basic Scala types.
CellEncoder[Int].encode(123) res1: String = 123
All default CellCodec instances.