Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Renderable) Add a new Value variant: Renderable #133

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

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