Add Display method for Node variant *name* #199
noahprice-dev
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working with this crate to perform MD to SVG translation. Id like to be able to create warnings for unsupported/Not Yet Supported MD types that provide the markdown type in an error message, however this currently requires a lengthy match on each unsupported type in my own crate or interpolating the Debug display.
Id love to see something like
strumimplemented for the Node enum or a simplekindmethod on the Node enum to communicate what type it is. This shouldn't replace the existing infrastructure for matching, it's just to get a cleaner identity for my error messages.Something like
I think that if including
strumis deemed to heavy even as afeatureflag, that a simple display impl could be used with the string name of the variant. Il take a crack at this in a PR, but wanted to put it out if others have a similar use case or desire this functionality.Cheers!
Beta Was this translation helpful? Give feedback.
All reactions