Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods to sort lists on output #9

Open
thequux opened this issue Aug 16, 2018 · 0 comments
Open

Add methods to sort lists on output #9

thequux opened this issue Aug 16, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@thequux
Copy link
Contributor

thequux commented Aug 16, 2018

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)

@0ndorio 0ndorio added the enhancement New feature or request label Nov 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants