capsicum-rs icon indicating copy to clipboard operation
capsicum-rs copied to clipboard

Inconsistent naming in the Builder APIs

Open asomers opened this issue 1 year ago • 0 comments

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 leave Rights 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.

asomers avatar Jan 22 '24 23:01 asomers