ianprime0509/zig-xml

Make decoder type an option for `Reader` and `TokenReader`

Closed this issue · 0 comments

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.