Sometimes single-file and folder module names containing more than one public struct are singular and sometimes plural.
For example:
src/http/request.rs contains more than one request type.
src/http/response.rs contains more than one response type.
In general, the plural is the most used option.
The folder name in the plural is better because it contains a collection of that "thing", but sometimes, when you use the namespace, the singular is easier to read, for example:
request::Announce instead of requests::Announce.
Another advantage of the plural is you do not get Clippy warnings when a function in the module has a suffix which is the mod name, For example, mod handlers and an xxx_handler function inside.
I prefer the plural.
Sometimes single-file and folder module names containing more than one public struct are singular and sometimes plural.
For example:
src/http/request.rscontains more than one request type.src/http/response.rscontains more than one response type.In general, the plural is the most used option.
The folder name in the plural is better because it contains a collection of that "thing", but sometimes, when you use the namespace, the singular is easier to read, for example:
request::Announceinstead ofrequests::Announce.Another advantage of the plural is you do not get Clippy warnings when a function in the module has a suffix which is the mod name, For example, mod
handlersand anxxx_handlerfunction inside.I prefer the plural.