pub fn decoration_to_wit(
deco: &GutterDecoration,
registry: &SignRegistry,
) -> Result<Option<GutterDecoration>, String>Expand description
SG.3b — the registry-aware host→guest conversion.
The mirror of decoration_from_wit, for the direction that has no
consumer yet: nothing in the host sends native decorations to a guest. It
exists so the round trip is testable as a round trip — a name that survives
out and back is the property that matters, and testing only one direction
would not catch an id/name mapping that silently disagreed with itself.
A retired id has no name to send, so it converts to None rather than an
error, matching the inbound direction’s treatment of an unknown name.