CellEncoderInstances
kantan.csv.CellEncoderInstances
trait CellEncoderInstances
All default CellEncoder instances.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
trait CellCodecInstancesobject codecs
Members list
Implicits
Implicits
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.
Attributes
- Example
-
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.
Attributes
- Example
-
// 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 StringEncoder
instances into CellEncoder ones.
Turns existing StringEncoder
instances into CellEncoder ones.
This provides support for most basic Scala types.
Attributes
- Example
-
CellEncoder[Int].encode(123) res1: String = 123
In this article