Logo JDeck

Codec Module

Functions and values

Function or value Description

useCodec serializer (encoder, decoder)

Full Usage: useCodec serializer (encoder, decoder)

Parameters:
Returns: MessagePackSerializer
Type parameters: 'T

Registers an encoder and a decoder and returns a new serializer. The input serializer keeps its other settings: only the converter collection changes, with the new converter first. Decoder failures raise DecodingException, which MessagePackSerializer wraps in MessagePackSerializationException.

serializer : MessagePackSerializer
encoder : Encoder<'T>
decoder : Decoder<'T>
Returns: MessagePackSerializer

useCodecWithContext serializer (encoderFactory, decoderFactory)

Full Usage: useCodecWithContext serializer (encoderFactory, decoderFactory)

Parameters:
Returns: MessagePackSerializer
Type parameters: 'T

Registers encoder and decoder factories that receive the active serialization context on each operation, and returns a new serializer. Decoder failures raise DecodingException, which MessagePackSerializer wraps in MessagePackSerializationException.

serializer : MessagePackSerializer
encoderFactory : SerializationContext -> Encoder<'T>
decoderFactory : SerializationContext -> Decoder<'T>
Returns: MessagePackSerializer

useDecoder serializer decoder

Full Usage: useDecoder serializer decoder

Parameters:
Returns: MessagePackSerializer
Type parameters: 'T

Registers a decoder and returns a new serializer. The input serializer keeps its other settings: only the converter collection changes, with the new converter first. Decoder failures raise DecodingException, which MessagePackSerializer wraps in MessagePackSerializationException.

serializer : MessagePackSerializer
decoder : Decoder<'T>
Returns: MessagePackSerializer

useDecoderWithContext serializer decoderFactory

Full Usage: useDecoderWithContext serializer decoderFactory

Parameters:
Returns: MessagePackSerializer
Type parameters: 'T

Registers a decoder factory that receives the active serialization context on each operation, and returns a new serializer. Decoder failures raise DecodingException, which MessagePackSerializer wraps in MessagePackSerializationException.

serializer : MessagePackSerializer
decoderFactory : SerializationContext -> Decoder<'T>
Returns: MessagePackSerializer

useEncoder serializer encoder

Full Usage: useEncoder serializer encoder

Parameters:
Returns: MessagePackSerializer
Type parameters: 'T

Registers an encoder and returns a new serializer. The input serializer keeps its other settings: only the converter collection changes, with the new converter first.

serializer : MessagePackSerializer
encoder : Encoder<'T>
Returns: MessagePackSerializer

useEncoderWithContext serializer encoderFactory

Full Usage: useEncoderWithContext serializer encoderFactory

Parameters:
Returns: MessagePackSerializer
Type parameters: 'T

Registers an encoder factory that receives the active serialization context on each operation, and returns a new serializer.

serializer : MessagePackSerializer
encoderFactory : SerializationContext -> Encoder<'T>
Returns: MessagePackSerializer

Type something to start searching.