bendy
bendy copied to clipboard
Add methods to sort lists on output
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)