Meta

doobie.util.meta.Meta
See theMeta companion object
final class Meta[A](val get: Get[A], val put: Put[A])

Convenience for introducing a symmetric Get/Put pair into implicit scope, and for deriving new symmetric pairs. It's important to understand that Meta should never be demanded by user methods; instead demand both Get and Put. The reason for this is that while Meta implies Get and Put, the presence of both Get and Put does not imply Meta.

Attributes

Companion
object
Source
meta.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def imap[B](f: A => B)(g: B => A): Meta[B]

Meta is an invariant functor. Prefer timap as it provides for better diagnostics.

Meta is an invariant functor. Prefer timap as it provides for better diagnostics.

Attributes

Source
meta.scala
def tiemap[B](f: A => Either[String, B])(g: B => A)(using evidence$2: TypeName[B], showA: Show[A]): Meta[B]

Variant of timap that allows the reading conversion to fail.

Variant of timap that allows the reading conversion to fail.

Attributes

Source
meta.scala
def timap[B](f: A => B)(g: B => A)(using evidence$1: TypeName[B]): Meta[B]

Variant of imap that takes a type tag, to aid in diagnostics.

Variant of imap that takes a type tag, to aid in diagnostics.

Attributes

Source
meta.scala

Concrete fields

val get: Get[A]

Attributes

Source
meta.scala
val put: Put[A]

Attributes

Source
meta.scala