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:
MergePatchfollowed by at least two more (e.g.MergePatchOrderModel); errors are reported atspan, calling the structwhat. - pascal_
case_ segments - The pascal-case segments of the struct name
name, which must have at leastmin_segments; errors are reported atspan, calling the structwhat(e.g. “struct”, “merge patch model”). - path_
name - The struct named by
path(e.g. of#[merge_patch(patch = path)]): its last segment.