pub enum Cross {
Into,
Map(Path),
}Expand description
HOW a field’s value reaches its seat.
Variants§
Into
into — the seat takes impl Into<…>, so the argument’s type is PINNED to the field’s own.
Inference is what needs the word. The bridge takes its target from the position it lands in,
and a position spelled impl Into<X> is an anonymous type parameter rather than a type — so
bridge(value) there asks the compiler to pick some T: Into<X> out of the whole program and
it correctly refuses (E0283). Pinning the target to the type the manifest restated resolves
it, and the remaining T: Into<X> obligation is the upstream’s own signature doing its job.
Map(Path)
map = "…" — the value crosses through the named function instead of through the bridge.
The last 1% the bridge cannot reach: two types with no conversion between them, a lossy narrowing an author is willing to declare, a unit change. It OVERRIDES a blanket that would otherwise have claimed the field, which is the precedence a per-field word always has over a per-type one.