capsicum-rs
capsicum-rs copied to clipboard
Inconsistent naming in the Builder APIs
capsicum contains three Builder structures
-
RightsBuilder
=>FileRights
-
IoctlsBuilder
=> IoctlRights` -
FcntlsBuilder
=>FcntlRights
There are two inconsistencies here:
- The usual pattern used by other crates is
XBuilder
=>X
. But we leaveRights
out of the builder's name. - The pluralization is weird. It's "Ioctls" in the builder, but "Ioctl" in the build structure. This wouldn't be a problem if it weren't for the first thing.
I suggest one of two solutions:
- Put "Rights" in the builder name, like
IoctlRightsBuilder
- Use modules to provide namespacing. e.g.
capsicum::ioctl::RightsBuilder
=>capsicum::ioctl::Rights
.