implement Log on more foreign types #458
Labels
No labels
bug
duplicate
easy
enhancement
help wanted
invalid
question
rfc
structured-logging
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-rust-lang/log#458
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We already have
impl <T: Log> Log for Box<T>. It would be cool to have this for more types, for exampleCow<'static, T: Log>,Rcetc.I'd have to double-check, but this may even be generalizable to
impl <T, R> Log for T where T: Borrow<R>, R: LogThe general impl based on
Borrowis probably not one we'd want to take on, just because once you have such a broad blanket implementation you end up somewhat painted into a corner with any additional ones you might consider.I think a bunch of common shared container types would be worthwhile:
&'a T: Log + ?SizedRc<T: Log>Arc<T: Log>Yes. This is a topic where impl specialization would be really helpful.
Would you be interested in a PR?
Absolutely! 🙏