valuable icon indicating copy to clipboard operation
valuable copied to clipboard

Add a Display variant to Value.

Open chanks opened this issue 3 years ago • 4 comments

Per discussion in Discord - @hawkw saw this as a desirable feature, to support emitting generic text in tracing without requiring that there be an underlying &str value.

Note that I used the Display output directly in the Debug impl for Value::Display - this seems a little awkward, but I'm not sure of a better option.

chanks avatar Feb 07 '22 01:02 chanks

I opened https://github.com/chanks/valuable/pull/1 to suggest a few potential changes to this PR. @chanks, please take a look and feel free to merge that branch into yours if you like! I would like to get this merged soon, if you have the time. Otherwise, I'm also happy to take it across the finish line, if you're busy.

hawkw avatar Mar 07 '22 17:03 hawkw

Updated with your changes, thank you!

chanks avatar Mar 08 '22 00:03 chanks

I think it would be preferable to compare this with the approach discussed in https://github.com/tokio-rs/valuable/issues/43 before merging. (having both is confusing.)

taiki-e avatar Mar 10 '22 14:03 taiki-e

This is going to be a blocker for fully replacing tracing's value system with valuable, so it would be nice to get this one figured out...

hawkw avatar Aug 18 '22 18:08 hawkw