Turns the specified function into a CsvInput.
Turns the specified function into a CsvInput.
Note that it's usually better to compose an existing instance through CsvInput.contramap or CsvInput.contramapResult rather than create one from scratch. For example:
val urlInput: CsvInput[URL] = CsvInput[InputStream].contramap((url: URL) ⇒ url.openStream())
Summons an implicit instance of CsvInput[A]
if one can be found.
Summons an implicit instance of CsvInput[A]
if one can be found.
This is simply a convenience method. The two following calls are equivalent:
val str: CsvInput[String] = CsvInput[String] val str2: CsvInput[String] = implicitly[CsvInput[String]]
Turns any array of bytes into a source of CSV data.
Turns any array of chars into a source of CSV data.
Turns any java.io.File
into a source of CSV data.
Turns any java.io.InputStream
into a source of CSV data.
Turns any path into a source of CSV data.
Turns any java.io.Reader
into a source of CSV data.
Turns any string into a source of CSV data.
Turns any java.net.URI
into a source of CSV data.
Turns any java.net.URL
into a source of CSV data.
Defines convenience methods for creating and retrieving instances of CsvInput.
Implicit default implementations of standard types are also declared here, always bringing them in scope with a low priority.
These default implementations can also be useful when writing more complex instances: if you need to write a
CsvInput[T]
and have both aCsvInput[S]
and aT ⇒ S
, you need just use CsvInput.contramap to create your implementation.