trait CsvSink[-S] extends VersionSpecificCsvSink[S] with Serializable

Type class for all types that can be turned into CsvWriter instances.

Instances of CsvSink are rarely used directly. The preferred, idiomatic way is to use the implicit syntax provided by CsvSinkOps, brought in scope by importing kantan.csv.ops._.

See the companion object for default implementations and construction methods.

Self Type
CsvSink[S]
Source
CsvSink.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CsvSink
  2. Serializable
  3. VersionSpecificCsvSink
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def open(s: S): Writer

    Opens a Writer on the specified S.

Concrete Value Members

  1. def contramap[T](f: (T) => S): CsvSink[T]

    Turns a CsvSink[S] into a CsvSink[T].

    Turns a CsvSink[S] into a CsvSink[T].

    This allows developers to adapt existing instances of CsvSink rather than write one from scratch.

    One could, for example, write CsvSource[File] by basing it on CsvSource[OutputStream]:

    def fileOutput(implicit c: scala.io.Codec): CsvSink[File] =
      CsvSink[OutputStream].contramap(f ⇒ new FileOutputStream(f, c.charSet))
  2. def write[A](s: S, rows: IterableOnce[A], conf: CsvConfiguration)(implicit arg0: HeaderEncoder[A], e: WriterEngine): Unit

    Writes the specified collections directly in the specifie S.

    Writes the specified collections directly in the specifie S.

    s

    where to write the CSV data.

    rows

    CSV data to encode and serialize.

    conf

    CSV writing behaviour.

    Definition Classes
    VersionSpecificCsvSink
  3. def writer[A](s: S, conf: CsvConfiguration)(implicit arg0: HeaderEncoder[A], e: WriterEngine): CsvWriter[A]

    Opens a CsvWriter on the specified S.

    Opens a CsvWriter on the specified S.

    s

    what to open a CsvWriter on.

    conf

    CSV writing behaviour.

Deprecated Value Members

  1. def write[A](s: S, rows: IterableOnce[A], sep: Char, header: String*)(implicit arg0: HeaderEncoder[A], e: WriterEngine): Unit
    Definition Classes
    VersionSpecificCsvSink
    Annotations
    @deprecated
    Deprecated

    (Since version 0.1.18) use write(S, TraversableOnce[A], CsvConfiguration) instead

  2. def writer[A](s: S, sep: Char, header: String*)(implicit arg0: HeaderEncoder[A], e: WriterEngine): CsvWriter[A]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.1.18) use writer(S, CsvConfiguration) instead