pub fn escape_segment(name: &str) -> StringExpand description
Escape a logical path segment for inclusion after either separator.
The escape is intentionally tiny: only leading > and leading \ are
rewritten, because only the first byte after / participates in the
decompose-boundary grammar. A literal leading > becomes \>; a literal
leading \ becomes \\ so the escaped spelling itself can round-trip.