magiclen / html-escape

This library is for encoding/escaping special characters in HTML and decoding/unescaping HTML entities as well.
MIT License
40 stars 5 forks source link

Feature request: enum implementing fmt::Display #5

Open Allen-Webb opened 1 year ago

Allen-Webb commented 1 year ago

I was looking at using this crate and for use with std Rust it would be much more ergonomic to have an enum for each of the different cases cases that implements fmt::Display and calls the appropriate escape function. This would let you wrap values you want to print in format!(...) with the enum to have them be escaped appropriately.