Extract functions.

This commit is contained in:
Dillon Kearns 2022-01-25 18:26:46 -08:00
parent d779ed15d2
commit afb7470cb1

View File

@ -51,23 +51,25 @@ data =
encode : Data -> Bytes encode : Data -> Bytes
encode items = encode items =
Bytes.Encode.encode (Types.w3_encode_Data items) encodeBytes w3_encode_Data items
--w3_encode_Data
decode : Bytes -> Result String Data decode : Bytes -> Result String Data
decode items = decode items =
Bytes.Decode.decode Types.w3_decode_Data items decodeBytes w3_decode_Data items
encodeBytes : (b -> Bytes.Encode.Encoder) -> b -> Bytes
encodeBytes bytesEncoder items =
Bytes.Encode.encode (bytesEncoder items)
decodeBytes : Bytes.Decode.Decoder a -> Bytes -> Result String a
decodeBytes bytesDecoder items =
Bytes.Decode.decode bytesDecoder items
|> Result.fromMaybe "Decoding error" |> Result.fromMaybe "Decoding error"
--w3_decode_Data |> Result.fromMaybe "Decoding error"
head : head :
StaticPayload Data RouteParams StaticPayload Data RouteParams
-> List Head.Tag -> List Head.Tag