Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upConform to the recommended pattern for sealed traits #1194
Comments
dtolnay
referenced this issue
May 31, 2017
Open
Tracking issue for libz blitz evaluation of reqwest #120
This comment has been minimized.
This comment has been minimized.
|
There may have been a misunderstanding of the usage of this trait. The The |
This comment has been minimized.
This comment has been minimized.
|
You are right. I misunderstood these traits. To tease this apart:
How would you feel about these changes?
I like this because now Also now rustdoc can show the |
seanmonstar
added a commit
that referenced
this issue
Jun 2, 2017
This comment has been minimized.
This comment has been minimized.
|
This has been done, and and is viewable in https://docs.rs/hyper/0.10.12. |
dtolnay commentedMay 31, 2017
The header module contains these two traits:
As discussed in the libz blitz evaluation, we would like a recognizable pattern for sealed traits that are impossible to implement outside of the current crate. We would like this pattern to be independent of whether certain functionality on a trait is a doc(hidden) implementation detail.
As such, we would like to:
clone_box(which is an implementation detail not relevant to users of hyper) from HeaderClone into a doc(hidden) method in HeaderHeaderClonetoSealedHeaderthat this trait is sealed and designed to be implemented only within the hyper codebase