Xmap

kreuzberg.extras.forms.Codec$.Xmap
case class Xmap[A, B, E](underlying: Codec[A, E], mapFn: A => B, contraMapFn: B => A) extends Codec[B, E]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Codec[B, E]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def decode(encoded: E): DecodingResult[B]

Decodes the value, either an error or the decoded value.

Decodes the value, either an error or the decoded value.

Attributes

Definition Classes
override def encode(value: B): E

Encodes a value into a string.

Encodes a value into a string.

Attributes

Definition Classes

Inherited methods

final def decodeOrThrow(transport: E): U

Decode a value or throw.

Decode a value or throw.

Attributes

Inherited from:
Codec
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def xmap[V](mapFn: B => V, contraMapFn: V => B): Codec[V, T]

Maps the encoded type to another type.

Maps the encoded type to another type.

Attributes

Inherited from:
Codec