Skip to main content

Module names

Module names 

Source
Expand description

Checks on the names of the structs a derive is placed on or links to.

The building blocks of DefaultConventions, for a Conventions impl to reuse. Checks on the names of the structs a derive is placed on or links to.

The building blocks of crate::conventions::DefaultConventions, which names the generated types after these structs’ pascal-case segments (OrderModel → Orders…Model), so the names must split into enough of them. Derives call them only through their conventions. Errors are reported at the span given: the struct’s name, or the path of the attribute naming another struct.

Functions§

merge_patch_segments
The pascal-case segments of the name of a merge patch struct: MergePatch followed by at least two more (e.g. MergePatchOrderModel); errors are reported at span, calling the struct what.
pascal_case_segments
The pascal-case segments of the struct name name, which must have at least min_segments; errors are reported at span, calling the struct what (e.g. “struct”, “merge patch model”).
path_name
The struct named by path (e.g. of #[merge_patch(patch = path)]): its last segment.