Closed Henry-E closed 2 years ago
Hi @Henry-E, I understand your concern here. There would be two ways to tackle this, but I'm not sure I am fond of either one :
pub(crate)
definition. This makes the code harder to read and actually requires every function/struct to be duplicated with added flags. (It's not possible to just switch the pub(crate)
part).pub
and add #'[doc(hidden]
flags. This is kind of a half-measure, but I'm also not a fan. This makes internals accessible to everyone even though those methods are hidden from the documentation. Considering the AOB is designed to be used on criitical systems, we don't want developers accidentally using library internals and misleading themselves or bypassing key safety features.This means that my current view on this is that playing around with library internals is really what forks are for. You don't need to remove (crate)
instances when you can just add your custom code directly to your fork.
For those of us who like to live dangerously it would be nice to have the option to access functions / structs that are private to the crate, i.e.
pub(crate)
. Hiding it behind a feature flag would stop the unaware from accessing them.It would just be great if there was a way to access some of these functions / structs without having to fork the repo just to remove
(crate)
.