Logo JDeck

Decoding Type

Decodes MessagePack payloads with JDeck decoders or automatic shapes. There is no fromString: MessagePack is a binary format.

Static members

Static member Description

Decoding.auto (serializer, stream)

Full Usage: Decoding.auto (serializer, stream)

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes one value directly from the stream into 'TResult with the given serializer and the reflection shape provider.

serializer : MessagePackSerializer
stream : Stream
Returns: Result<'TResult, DecodeError>

Decoding.auto stream

Full Usage: Decoding.auto stream

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes one value directly from the stream into 'TResult with the reflection shape provider.

stream : Stream
Returns: Result<'TResult, DecodeError>

Decoding.auto (serializer, bytes)

Full Usage: Decoding.auto (serializer, bytes)

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes the bytes directly into 'TResult with the given serializer and the reflection shape provider, so codecs registered with Codec drive automatic decoding. Serializer failures become DecodeError values whose value is Nil.

serializer : MessagePackSerializer
bytes : byte array
Returns: Result<'TResult, DecodeError>

Decoding.auto bytes

Full Usage: Decoding.auto bytes

Parameters:
    bytes : byte array

Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes the bytes directly into 'TResult with the reflection shape provider. Serializer failures become DecodeError values whose value is Nil.

bytes : byte array
Returns: Result<'TResult, DecodeError>

Decoding.autoFromMemory (serializer, buffer)

Full Usage: Decoding.autoFromMemory (serializer, buffer)

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes one value directly from the memory into 'TResult with the given serializer and the reflection shape provider.

serializer : MessagePackSerializer
buffer : ReadOnlyMemory<byte>
Returns: Result<'TResult, DecodeError>

Decoding.autoWithShape (serializer, shape, bytes)

Full Usage: Decoding.autoWithShape (serializer, shape, bytes)

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes the bytes directly into 'TResult with the given serializer and shape. Serializer failures become DecodeError values whose value is Nil.

serializer : MessagePackSerializer
shape : ITypeShape<'TResult>
bytes : byte array
Returns: Result<'TResult, DecodeError>

Decoding.autoWithShape (shape, bytes)

Full Usage: Decoding.autoWithShape (shape, bytes)

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes the bytes directly into 'TResult with the given shape. Serializer failures become DecodeError values whose value is Nil.

shape : ITypeShape<'TResult>
bytes : byte array
Returns: Result<'TResult, DecodeError>

Decoding.fromBytes (bytes, decoder)

Full Usage: Decoding.fromBytes (bytes, decoder)

Parameters:
    bytes : byte array
    decoder : Decoder<'TResult>

Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes one MessagePackValue from the bytes, then runs the decoder on it. Serializer failures become DecodeError values whose value is Nil, since no value was decoded.

bytes : byte array
decoder : Decoder<'TResult>
Returns: Result<'TResult, DecodeError>

Decoding.fromBytesCol (bytes, decoder)

Full Usage: Decoding.fromBytesCol (bytes, decoder)

Parameters:
Returns: Result<'TResult, DecodeError list>
Type parameters: 'TResult

Deserializes one MessagePackValue from the bytes, then runs the collect-errors decoder on it. Serializer failures become a single-element DecodeError list whose value is Nil.

bytes : byte array
decoder : CollectErrorsDecoder<'TResult>
Returns: Result<'TResult, DecodeError list>

Decoding.fromMemory (buffer, decoder)

Full Usage: Decoding.fromMemory (buffer, decoder)

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes one MessagePackValue from the memory, then runs the decoder.

buffer : ReadOnlyMemory<byte>
decoder : Decoder<'TResult>
Returns: Result<'TResult, DecodeError>

Decoding.fromMemoryCol (buffer, decoder)

Full Usage: Decoding.fromMemoryCol (buffer, decoder)

Parameters:
Returns: Result<'TResult, DecodeError list>
Type parameters: 'TResult

Deserializes one MessagePackValue from the memory, then runs the collect-errors decoder.

buffer : ReadOnlyMemory<byte>
decoder : CollectErrorsDecoder<'TResult>
Returns: Result<'TResult, DecodeError list>

Decoding.fromSequence (buffer, decoder)

Full Usage: Decoding.fromSequence (buffer, decoder)

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Deserializes one MessagePackValue from the byte sequence, then runs the decoder.

buffer : ReadOnlySequence<byte>
decoder : Decoder<'TResult>
Returns: Result<'TResult, DecodeError>

Decoding.fromSequenceCol (buffer, decoder)

Full Usage: Decoding.fromSequenceCol (buffer, decoder)

Parameters:
Returns: Result<'TResult, DecodeError list>
Type parameters: 'TResult

Deserializes one MessagePackValue from the byte sequence, then runs the collect-errors decoder.

buffer : ReadOnlySequence<byte>
decoder : CollectErrorsDecoder<'TResult>
Returns: Result<'TResult, DecodeError list>

Decoding.fromStream (stream, decoder)

Full Usage: Decoding.fromStream (stream, decoder)

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Reads one MessagePackValue from the stream, then runs the decoder. The serializer buffers the stream content before reading.

stream : Stream
decoder : Decoder<'TResult>
Returns: Result<'TResult, DecodeError>

Decoding.fromStreamCol (stream, decoder)

Full Usage: Decoding.fromStreamCol (stream, decoder)

Parameters:
Returns: Result<'TResult, DecodeError list>
Type parameters: 'TResult

Reads one MessagePackValue from the stream, then runs the collect-errors decoder.

stream : Stream
decoder : CollectErrorsDecoder<'TResult>
Returns: Result<'TResult, DecodeError list>

Decoding.fromValue (value, decoder)

Full Usage: Decoding.fromValue (value, decoder)

Parameters:
Returns: Result<'TResult, DecodeError>
Type parameters: 'TResult

Runs the decoder on one already decoded MessagePackValue. This is the full-document entry point for values held in memory.

value : MessagePackValue
decoder : Decoder<'TResult>
Returns: Result<'TResult, DecodeError>

Decoding.fromValueCol (value, decoder)

Full Usage: Decoding.fromValueCol (value, decoder)

Parameters:
Returns: Result<'TResult, DecodeError list>
Type parameters: 'TResult

Runs the collect-errors decoder on one already decoded value.

value : MessagePackValue
decoder : CollectErrorsDecoder<'TResult>
Returns: Result<'TResult, DecodeError list>

Type something to start searching.