Skip to content

Commit

Permalink
add keycodec to BaseOpaque
Browse files Browse the repository at this point in the history
  • Loading branch information
halotukozak committed Jul 27, 2024
1 parent 4b50f6c commit 31d8063
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.avsystem.commons
package opaque

import com.avsystem.commons.opaque.Castable.<:>
import com.avsystem.commons.serialization.GenCodec
import com.avsystem.commons.serialization.{GenCodec, GenKeyCodec}

private[opaque] trait BaseOpaque[From] extends Castable.Ops {
trait Tag
Expand All @@ -12,5 +12,6 @@ private[opaque] trait BaseOpaque[From] extends Castable.Ops {


implicit protected final val castable: From <:> Type = new Castable[From, Type]
implicit final def codec(implicit fromCodec: GenCodec[From]): GenCodec[Type] = wrapF(fromCodec)
implicit final def transparentCodec(implicit fromCodec: GenCodec[From]): GenCodec[Type] = wrapF(fromCodec)
implicit final def transparentKeyCodec(implicit fromKeyCodec: GenKeyCodec[From]): GenKeyCodec[Type] = wrapF(fromKeyCodec)
}

0 comments on commit 31d8063

Please sign in to comment.