Codec

sttp.tapir.Codec
See theCodec companion object
trait Codec[L, H, +CF <: CodecFormat]

A bi-directional mapping between low-level values of type L and high-level values of type H. Low level values are formatted as CF.

The mapping consists of a pair of functions, one to decode (L => H), and one to encode (H => L). Decoding can fail, and this is represented as a result of type DecodeResult.

A codec also contains optional meta-data in the schema of the high-level value (which includes validators), as well as an instance of the format (which determines the media type of the low-level value).

Codec instances are used as implicit values, and are looked up when defining endpoint inputs/outputs. Depending on a particular endpoint input/output, it might require a codec which uses a specific format, or a specific low-level value.

Codec instances can be derived basing on other values (e.g. such as json encoders/decoders when integrating with json libraries). Or, they can be defined by hand for custom types, usually customising an existing, simpler codec.

Codecs can be chained with Mapping s using the map function.

Type parameters

CF

The format of encoded values. Corresponds to the media type.

H

The type of the high-level value.

L

The type of the low-level value.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Codec[L, H, CF]

Members list

Value members

Abstract methods

def encode(h: H): L
Implicitly added by binaryOrCloseWebSocketFrame
def encode(h: H): L
Implicitly added by binaryWebSocketFrame
def encode(h: H): L
Implicitly added by list
def encode(h: H): L
Implicitly added by listHead
def encode(h: H): L
Implicitly added by listHeadOption
def encode(h: H): L
Implicitly added by option
def encode(h: H): L
Implicitly added by optionHead
def encode(h: H): L
Implicitly added by part
def encode(h: H): L
Implicitly added by set
def encode(h: H): L
Implicitly added by textOrCloseWebSocketFrame
def encode(h: H): L
Implicitly added by textWebSocketFrame
def encode(h: H): L
Implicitly added by tupledWithRaw
def encode(h: H): L
Implicitly added by unwrapPart
def encode(h: H): L
Implicitly added by vector
def encode(h: H): L
def format: CF
Implicitly added by binaryOrCloseWebSocketFrame
def format: CF
Implicitly added by binaryWebSocketFrame
def format: CF
Implicitly added by list
def format: CF
Implicitly added by listHead
def format: CF
Implicitly added by listHeadOption
def format: CF
Implicitly added by option
def format: CF
Implicitly added by optionHead
def format: CF
Implicitly added by part
def format: CF
Implicitly added by set
def format: CF
Implicitly added by textOrCloseWebSocketFrame
def format: CF
Implicitly added by textWebSocketFrame
def format: CF
Implicitly added by tupledWithRaw
def format: CF
Implicitly added by unwrapPart
def format: CF
Implicitly added by vector
def format: CF
def rawDecode(l: L): DecodeResult[H]
Implicitly added by binaryOrCloseWebSocketFrame
def rawDecode(l: L): DecodeResult[H]
Implicitly added by binaryWebSocketFrame
def rawDecode(l: L): DecodeResult[H]
Implicitly added by list
def rawDecode(l: L): DecodeResult[H]
Implicitly added by listHead
def rawDecode(l: L): DecodeResult[H]
Implicitly added by listHeadOption
def rawDecode(l: L): DecodeResult[H]
Implicitly added by option
def rawDecode(l: L): DecodeResult[H]
Implicitly added by optionHead
def rawDecode(l: L): DecodeResult[H]
Implicitly added by part
def rawDecode(l: L): DecodeResult[H]
Implicitly added by set
def rawDecode(l: L): DecodeResult[H]
Implicitly added by textOrCloseWebSocketFrame
def rawDecode(l: L): DecodeResult[H]
Implicitly added by textWebSocketFrame
def rawDecode(l: L): DecodeResult[H]
Implicitly added by tupledWithRaw
def rawDecode(l: L): DecodeResult[H]
Implicitly added by unwrapPart
def rawDecode(l: L): DecodeResult[H]
Implicitly added by vector
def rawDecode(l: L): DecodeResult[H]
def schema: Schema[H]
Implicitly added by binaryOrCloseWebSocketFrame
def schema: Schema[H]
Implicitly added by binaryWebSocketFrame
def schema: Schema[H]
Implicitly added by list
def schema: Schema[H]
Implicitly added by listHead
def schema: Schema[H]
Implicitly added by listHeadOption
def schema: Schema[H]
Implicitly added by option
def schema: Schema[H]
Implicitly added by optionHead
def schema: Schema[H]
Implicitly added by part
def schema: Schema[H]
Implicitly added by set
def schema: Schema[H]
Implicitly added by textOrCloseWebSocketFrame
def schema: Schema[H]
Implicitly added by textWebSocketFrame
def schema: Schema[H]
Implicitly added by tupledWithRaw
def schema: Schema[H]
Implicitly added by unwrapPart
def schema: Schema[H]
Implicitly added by vector
def schema: Schema[H]

Concrete methods

def decode(l: L): DecodeResult[H]
Implicitly added by binaryOrCloseWebSocketFrame
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by binaryWebSocketFrame
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by list
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by listHead
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by listHeadOption
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by option
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by optionHead
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by part
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by set
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by textOrCloseWebSocketFrame
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by textWebSocketFrame
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by tupledWithRaw
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by unwrapPart
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
Implicitly added by vector
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def decode(l: L): DecodeResult[H]
  • calls rawDecode
  • catches any exceptions that might occur, converting them to decode failures
  • validates the result

Attributes

def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by binaryOrCloseWebSocketFrame
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by binaryWebSocketFrame
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by list
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by listHead
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by listHeadOption
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by option
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by optionHead
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by part
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by set
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by textOrCloseWebSocketFrame
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by textWebSocketFrame
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by tupledWithRaw
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by unwrapPart
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
Implicitly added by vector
def format[CF2 <: CodecFormat](f: CF2): Codec[L, H, CF2]
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by binaryOrCloseWebSocketFrame
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by binaryOrCloseWebSocketFrame
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by binaryWebSocketFrame
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by binaryWebSocketFrame
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by list
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by list
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by listHead
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by listHead
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by listHeadOption
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by listHeadOption
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by option
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by option
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by optionHead
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by optionHead
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by part
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by part
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by set
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by set
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by textOrCloseWebSocketFrame
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by textOrCloseWebSocketFrame
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by textWebSocketFrame
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by textWebSocketFrame
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by tupledWithRaw
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by tupledWithRaw
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by unwrapPart
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by unwrapPart
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
Implicitly added by vector
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by vector
def map[HH](mapping: Mapping[H, HH]): Codec[L, HH, CF]
def map[HH](f: H => HH)(g: HH => H): Codec[L, HH, CF]
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by binaryOrCloseWebSocketFrame
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by binaryWebSocketFrame
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by list
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by listHead
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by listHeadOption
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by option
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by optionHead
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by part
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by set
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by textOrCloseWebSocketFrame
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by textWebSocketFrame
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by tupledWithRaw
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by unwrapPart
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by vector
def mapDecode[HH](f: H => DecodeResult[HH])(g: HH => H): Codec[L, HH, CF]
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by binaryOrCloseWebSocketFrame

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by binaryWebSocketFrame

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by list

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by listHead

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by listHeadOption

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by option

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by optionHead

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by part

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by set

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by textOrCloseWebSocketFrame

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by textWebSocketFrame

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by tupledWithRaw

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by unwrapPart

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]
Implicitly added by vector

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapEither[HH](f: H => Either[String, HH])(g: HH => H): Codec[L, HH, CF]

Maps this codec to the given higher-level type HH.

Maps this codec to the given higher-level type HH.

Type parameters

HH

target type

Value parameters

f

decoding function

g

encoding function

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by binaryOrCloseWebSocketFrame

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by binaryWebSocketFrame

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by list

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by listHead

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by listHeadOption

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by option

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by optionHead

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by part

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by set

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by textOrCloseWebSocketFrame

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by textWebSocketFrame

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by tupledWithRaw

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by unwrapPart

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]
Implicitly added by vector

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def mapValidate[HH](v: Validator[H])(f: H => HH)(g: HH => H): Codec[L, HH, CF]

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Adds the given validator to the codec's schema, and maps this codec to the given higher-level type HH.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create codecs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by binaryOrCloseWebSocketFrame
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by binaryOrCloseWebSocketFrame
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by binaryOrCloseWebSocketFrame
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by binaryWebSocketFrame
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by binaryWebSocketFrame
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by binaryWebSocketFrame
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by list
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by list
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by list
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by listHead
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by listHead
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by listHead
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by listHeadOption
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by listHeadOption
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by listHeadOption
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by option
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by option
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by option
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by optionHead
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by optionHead
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by optionHead
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by part
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by part
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by part
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by set
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by set
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by set
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by textOrCloseWebSocketFrame
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by textOrCloseWebSocketFrame
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by textOrCloseWebSocketFrame
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by textWebSocketFrame
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by textWebSocketFrame
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by textWebSocketFrame
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by tupledWithRaw
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by tupledWithRaw
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by tupledWithRaw
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by unwrapPart
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by unwrapPart
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by unwrapPart
def schema(s2: Schema[H]): Codec[L, H, CF]
Implicitly added by vector
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
Implicitly added by vector
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
Implicitly added by vector
def schema(s2: Schema[H]): Codec[L, H, CF]
def schema(s2: Option[Schema[H]]): Codec[L, H, CF]
def schema(modify: (Schema[H]) => Schema[H]): Codec[L, H, CF]
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by binaryOrCloseWebSocketFrame

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by binaryWebSocketFrame

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by list

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by listHead

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by listHeadOption

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by option

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by optionHead

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by part

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by set

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by textOrCloseWebSocketFrame

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by textWebSocketFrame

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by tupledWithRaw

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by unwrapPart

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]
Implicitly added by vector

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validate(v: Validator[H]): Codec[L, H, CF]

Adds a validator to the codec's schema.

Adds a validator to the codec's schema.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by binaryOrCloseWebSocketFrame

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by binaryWebSocketFrame

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by list

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by listHead

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by listHeadOption

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by option

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by optionHead

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by part

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by set

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by textOrCloseWebSocketFrame

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by textWebSocketFrame

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by tupledWithRaw

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by unwrapPart

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]
Implicitly added by vector

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateIterable[C <: (Iterable), U](v: Validator[U])(implicit hIsCU: H =:= C[U]): Codec[L, H, CF]

Adds a validator which validates each element in the collection.

Adds a validator which validates each element in the collection.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by binaryOrCloseWebSocketFrame

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by binaryWebSocketFrame

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by list

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by listHead

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by listHeadOption

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by option

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by optionHead

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by part

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by set

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by textOrCloseWebSocketFrame

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by textWebSocketFrame

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by tupledWithRaw

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by unwrapPart

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]
Implicitly added by vector

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes

def validateOption[U](v: Validator[U])(implicit hIsOptionU: H =:= Option[U]): Codec[L, H, CF]

Adds a validator which validates the option's element, if it is present.

Adds a validator which validates the option's element, if it is present.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Should only be used if the schema hasn't been created by .mapping another one, but directly from Schema[U]. Otherwise the shape of the schema doesn't correspond to the type T, but to some lower-level representation of the type. This might cause invalid results at run-time.

Attributes