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 upconsider exposing error kinds #193
Conversation
This comment has been minimized.
This comment has been minimized.
|
hey @hinaria! I sympathize with wanting to be able to strongly match on the different error variants that can occur. However, there are some reasons that the enum is not exposed publicly.
That's exactly why the enum isn't exposed, because adding new variants is considered a breaking change, and so if reqwest 1.4 (for example) gained a new feature which meant a new kind of error is possible, that means 1.5, which cargo would automatically update people to, would suddenly break compilation, and so it would then need to be reqwest 2.0. There is a just-accepted RFC to allow exposing an enum and preventing users from exhaustively matching on it, so that adding new variants is no longer a breaking change. I could see adding a Many libraries have done this today by naming a |
This comment has been minimized.
This comment has been minimized.
|
I'm going to close this for now, so I don't keep thinking there is something for me to merge. But, I don't mean this to mean that the discussion is closed. Feel free to discuss here or in a new issue. |
hinaria commentedAug 29, 2017
•
edited
(snipped)