cursive icon indicating copy to clipboard operation
cursive copied to clipboard

implement std::fmt::Debug for View

Open njskalski opened this issue 5 years ago • 1 comments

njskalski avatar Mar 22 '20 16:03 njskalski

On the latest master there is View::type_name, which provides some debugging. Though it's meant to give the type of the view, not the current state of this particular instance.

I considered adding std::fmt::Debug as a required trait, but I felt it was raising a bit too much the entry barrier to writing custom views. I was hoping specialization could help there (provide a default implementation returning the type name, and letting users override it when they want).

gyscos avatar Mar 31 '20 18:03 gyscos