Codec

kreuzberg.extras.forms.Codec
See theCodec companion object
trait Codec[U, T]

Lifts a value from an encoding

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Xmap[A, B, E]
object simpleInt.type
object simpleString.type
object codec.type
object codec.type

Members list

Value members

Abstract methods

def decode(encoded: T): DecodingResult[U]

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

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

Attributes

def encode(value: U): T

Encodes a value into a string.

Encodes a value into a string.

Attributes

Concrete methods

final def decodeOrThrow(transport: T): U

Decode a value or throw.

Decode a value or throw.

Attributes

def xmap[V](mapFn: U => V, contraMapFn: V => U): Codec[V, T]

Maps the encoded type to another type.

Maps the encoded type to another type.

Attributes