You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is there a way to nicely convert an enum to its string representation? I see that there is a (very useful) from(&str) method, but what about the inverse, something like to_string()?
the current way i am doing it requires a somewhat ugly format!("{:?}", foo) since the enums have the Debug trait
i migrated from rust-protobuf to this library, and they had a to_string() func
The text was updated successfully, but these errors were encountered:
is there a way to nicely convert an enum to its string representation? I see that there is a (very useful)
from(&str)
method, but what about the inverse, something liketo_string()
?the current way i am doing it requires a somewhat ugly
format!("{:?}", foo)
since the enums have theDebug
traiti migrated from
rust-protobuf
to this library, and they had ato_string()
funcThe text was updated successfully, but these errors were encountered: