bendy icon indicating copy to clipboard operation
bendy copied to clipboard

Add methods to sort lists on output

Open thequux opened this issue 7 years ago • 0 comments

Many times Vec<T> is used as a set datastructure, where nothing cares about the order of elements within the list. To allow such lists to easily be emitted canonically, we should have methods on the various Enocder types (including SingleItemEncoder) that buffer the encoded objects and output them sorted by either Bencode order (i.e, ordered ASCIIbetically by their encoded form) or by any existing Ord impl (if one exists)

thequux avatar Aug 16 '18 13:08 thequux