pub enum Road {
Identity,
Join(LitStr),
Multi,
Declared(Conversion),
}Expand description
THE FROM-ROAD one engine block declares: how the elected field’s value becomes THIS engine’s document text.
§from and no into, and the direction law is why
from BUILDS the projection a block is about — here, the document. There is no into leg and
there is not going to be one: a document is written and searched, never hydrated back into the
domain. What a hit hands back is an ADDRESS, and that pair does round-trip, which is the axis
this one deliberately lacks.
§The shorthands are a SEAM, not a closed pair
join and multi are the two the framework ships because they are the two loops a converter is
otherwise written out as, and they differ in the one thing the declaration is about: whether a
phrase may match ACROSS two values. A third builtin arrives as a variant here and an arm in the
walk — no grammar change, because the position it is written in already exists.
§Per ENGINE BLOCK, and it could not be per field
The segmentation means different things to different engines: a positional one puts a gap between segments, and a single-text-column face has to flatten them — so one converter indexes correctly in the first and subtly wrongly in the second, both “working” and only the results differing. A field-level, engine-agnostic road is therefore not expressible, which is what puts this member on the block rather than beside the election.
Variants§
Identity
NOTHING was declared — the IDENTITY road, the field’s value being the document text as it stands.
The default, and the one that can REFUSE: whether a value is text at all is not a question a
front end can answer, so it is asked as a BOUND at the expansion and the refusal lands on the
field’s own type token. See ingraph’s Searchable.
Join(LitStr)
join = "<sep>" — ONE segment, the values written into it with the separator between them. A
phrase CAN match across two values.
Multi
multi — ONE SEGMENT PER VALUE. A phrase CANNOT match across two of them.
Declared(Conversion)
from = "…" / try_from = "…" — the conversion the declaration NAMED, in the SHIPPED family
every other crossing in this grammar is written in.
Conversion::Default never reaches here: a block that
named no function took Identity, which is a different road rather than a
missing one.
Implementations§
Source§impl Road
impl Road
Sourcepub const fn declared(&self) -> bool
pub const fn declared(&self) -> bool
Whether the block wrote a road at all, or took the identity one by saying nothing.