Skip to main content

Module naming

Module naming 

Source
Expand description

One function per name, so the generator and the checks cannot disagree.

Structs§

BehaviorColumn
KnownArea
RouteSite
StoredColumn

Enums§

PathParameter
What a route builder takes for a path parameter: what a handler can read from it.
WiringSide
Which generated file names a module’s wired item: its own src/wiring.rs, so the item may stay private to the crate, or the app’s.

Constants§

BILLING_PACKAGE
CONTENT_PACKAGE
DEFAULT_BEHAVIORS
IDENTITY_AREA
IDENTITY_PACKAGE
QUERY_MODULE
SOURCE_LANGUAGE
The language the app’s names are written in: labels and enum variants are those names humanized, so it needs no file.
TASK_RUNNERS
The sofie functions an app’s main hands its tasks to.
TENANCY_PACKAGE
WEB_AREA

Functions§

behavior_columns
Must match sofie-db’s Behavior::columns.
bound_aggregate
Must match sofie-db’s bind, which loads the aggregate named like the segment.
contract_package
crate_name
file_stem
handler_module
A GET never changes state and an action is never a GET, so each lives in its own module.
job_name
key_constant
orders.count is ORDERS_COUNT in a contract’s keys.
pascal_case
weekly_news as WeeklyNews.
path_parameters
relative_path
Joined with /, as Rust paths in concat! need on every platform.
route_parameters
None for a parameter no handler can read.
screen_key
snake_case
sofie-macros has no dependencies, so it keeps a copy its tests hold to this one.
stored_columns
Must match each value’s Cast::COLUMNS. None for a type stored another way: an Option, an enum, a value of the app’s own.
stored_name
Must match how #[derive(Enum)] stores a variant.
task_name
unraw
A name is the identifier as read, so r#match is named match.