Fleece


Codec Module

Namespace: Fleece

Assembly: Fleece.FSharpData.dll

Parent Module: FSharpData
Functions operating on Codecs (as pair of functions)

Functions and values

Function or value Description

compose (arg1, arg2) (arg3, arg4)

Full Usage: compose (arg1, arg2) (arg3, arg4)

Parameters:
    arg0 : 'a -> ^b
    arg1 : 'e -> 'f
    arg2 : 'd -> ^c
    arg3 : 'g -> 'e

Returns: ('a -> ^c) * ('g -> 'f)

Creates a new codec which is the result of applying codec2 then codec1 for encoding and codec1 then codec2 for decoding

arg0 : 'a -> ^b
arg1 : 'e -> 'f
arg2 : 'd -> ^c
arg3 : 'g -> 'e
Returns: ('a -> ^c) * ('g -> 'f)

decode (d, arg2) i

Full Usage: decode (d, arg2) i

Parameters:
    d : Decoder<'i, 'a>
    arg1 : 'b
    i : 'i

Returns: 'a ParseResult

d : Decoder<'i, 'a>
arg1 : 'b
i : 'i
Returns: 'a ParseResult

encode (arg1, e) a

Full Usage: encode (arg1, e) a

Parameters:
    arg0 : 'b
    e : Encoder<'o, 'a>
    a : 'a

Returns: 'o

arg0 : 'b
e : Encoder<'o, 'a>
a : 'a
Returns: 'o

invmap f g (r, w)

Full Usage: invmap f g (r, w)

Parameters:
    f : 'T -> 'U
    g : 'U -> 'T
    r : ^a
    w : ^c

Returns: ^b * ^d

Turns a Codec into another Codec, by mapping it over an isomorphism.

f : 'T -> 'U
g : 'U -> 'T
r : ^a
w : ^c
Returns: ^b * ^d

ofConcrete arg1

Full Usage: ofConcrete arg1

Parameters:
Returns: (^f -> 'd ParseResult) * ('e -> IReadOnlyDictionary<'b, 'c>)

Extracts a pair of functions from a ConcreteCodec

arg0 : ConcreteCodec<'a list, KeyValuePair<'b, 'c> list, 'd, 'e>
Returns: (^f -> 'd ParseResult) * ('e -> IReadOnlyDictionary<'b, 'c>)

ofMonoid x

Full Usage: ofMonoid x

Parameters:
Returns: IReadOnlyDictionary<'a, 'b>

x : KeyValuePair<'a, 'b> list
Returns: IReadOnlyDictionary<'a, 'b>

toConcrete (d, e)

Full Usage: toConcrete (d, e)

Parameters:
Returns: ConcreteCodec<KeyValuePair<'a, 'b> list, 'f list, 'c, 'd>

Wraps a pair of functions into a ConcreteCodec

d : IReadOnlyDictionary<'a, 'b> -> 'c ParseResult
e : 'd -> ^e
Returns: ConcreteCodec<KeyValuePair<'a, 'b> list, 'f list, 'c, 'd>

toMonoid x

Full Usage: toMonoid x

Parameters:
    x : ^a

Returns: 'b list

x : ^a
Returns: 'b list