Currently, the decoder to use when reading is a separate argument to the reader and tokenReader functions, and the decoder type is a separate type argument to Reader and TokenReader. With a slight decrease in flexibility, we can eliminate these extra parameters by making the decoder type an additional option in the associated options struct and requiring it to be constructable as Decoder{}.
This would reduce the number of parameters involved and the overall complexity of the API.
Currently, the decoder to use when reading is a separate argument to the
reader
andtokenReader
functions, and the decoder type is a separate type argument toReader
andTokenReader
. With a slight decrease in flexibility, we can eliminate these extra parameters by making the decoder type an additional option in the associated options struct and requiring it to be constructable asDecoder{}
.This would reduce the number of parameters involved and the overall complexity of the API.