SimonSapin/rust-webencodings — pull request #1 by sdeframond (2013-01-15 04:23:35+00:00)
Title: Use traits and enums instead of types for the API.

This commit defines an `Encoding` trait and an enum for each encoding (namely `UTF8` and `Windows1252`). Each enum has a single value and implements the `Encoding` trait.

This gives provides a more usable API as we don't have to use parenthesis to access the `encode`/`decode` methods: `UTF8.decode(...)` works as expected.