pub struct DeclaredLane {
pub key: Ident,
pub accepts: Vec<Ident>,
pub catch_all: Option<Ident>,
}Expand description
ONE LANE, as a lanes(…) block wrote it — the framework’s half of one entry.
The engine’s half of the same entry is NOT here: it is carried verbatim into
Engine::options, because a lane’s analyzer is a word only the backend reads.
Fields§
§key: IdentThe lane’s KEY, carrying its own span — where a refusal about this lane lands, and the one word the gate ever hands back.
accepts: Vec<Ident>accepts(…) — the tags this lane answers beside its own key, in the order they were written.
catch_all: Option<Ident>catch_all — the WORD itself where it was written, so a refusal about a SECOND catch-all lands
on the second one rather than on the roster.
Implementations§
Source§impl DeclaredLane
impl DeclaredLane
Sourcepub fn of(key: Ident) -> Self
pub fn of(key: Ident) -> Self
A lane keyed key, accepting nothing and catching nothing — the bare zh entry.
Sourcepub fn claims(&self) -> impl Iterator<Item = &Ident>
pub fn claims(&self) -> impl Iterator<Item = &Ident>
Every WORD this lane claims — its key first, then its aliases.
That order is not a preference: it is the order
lane_claim addresses a roster’s flat claim positions in,
and the emitted per-word assertions are counted out against those positions. Two orders would
put a refusal’s sentence on the wrong word.