All Downloads are FREE. Search and download functionalities are using the official Maven repository.

medeia.generic.ShapelessDecoder.scala Maven / Gradle / Ivy

The newest version!
package medeia.generic

import cats.data.EitherNec
import medeia.decoder.BsonDecoderError
import org.mongodb.scala.bson.BsonDocument

trait ShapelessDecoder[Base, H] {
  def decode(bsonDocument: BsonDocument): EitherNec[BsonDecoderError, H]
  def map[B](f: H => B): ShapelessDecoder[Base, B] = x => this.decode(x).map(f(_))
}

object ShapelessDecoder extends HlistDecoderInstances with CoproductDecoderInstances




© 2015 - 2024 Weber Informatics LLC | Privacy Policy