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 upPrivate supertrait pattern #16
Comments
brson
added
the
important
label
Jun 30, 2017
This comment has been minimized.
This comment has been minimized.
|
Relevant discussion in the context of Hyper: hyperium/hyper#1194 |
dtolnay
added
the
new guideline
label
Sep 18, 2017
This comment has been minimized.
This comment has been minimized.
|
Added in e7d7202. |
dtolnay
closed this
Oct 29, 2017
This comment has been minimized.
This comment has been minimized.
matklad
commented
Jul 4, 2018
•
|
@dtolnay curious, why we put I don't think that it matters much in practice, but EDIT: nvm, methods of private supertraits are visible if you import the public trait: https://play.rust-lang.org/?gist=4cb854858e5cae10a25a40680d6a687c&version=stable&mode=debug&edition=2015 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dtolnay commentedApr 4, 2017
This pattern is a way to retain the ability to add/remove/modify methods of a public trait without breaking compatibility. Example from byteorder: BurntSushi/byteorder#69.