Skip to content

Conversation

@johnhurt
Copy link

@johnhurt johnhurt commented Sep 23, 2024

This is a method of representing a value only though its Display or Debug implementation.

There is some discussion in #43 about making 2 different variants for Display and Debug, but that presented a problem because Valuable needs to implement Debug, but & dyn Display doesn’t. Adding a new trait like Displayable to wrap & dyn Display seems a little wasteful 😜

This method wraps both would-be variants Display and Debug in an enum Renderable and adds a new variant of the same name. The next step is to add #[display] and #[debug] derive annotations to allow struct fields to be included as their Display or Debug implementations instead of actual values (as discussed in #131)

@benluelo
Copy link

is there any progress here? this would be incredibly helpful for custom domain specific types

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants