Skip to main content

score_param

Function score_param 

Source
pub fn score_param(field: &Ident) -> Ident
Expand description

The SCORE parameter one route’s currency rides — __INGRAPH_SCORE_<FIELD>__.

§The __…__ fence is the law and not a decoration

A per-route parameter is one per ROUTE, so a bare S1/S2 would be a name minted from a counter — and a counter’s names collide with whatever the declaring scope already calls S1. The fence is this crate’s standing answer for every emitted ident: both ends reserved, the field it belongs to spelled inside it, so two routes cannot mint one name and no declaration can collide with either.

A FUNCTION and not a format_ident! at each site, because the evidence enum, the error enum and the doors all spell it — and a name spelled four times is a name that can drift.