Post

How to Bypass Rust’s Orphan Rule

A trait author can add a generic parameter that lets downstream crates use a local marker type in an implementation for an otherwise foreign type. This is a library-design technique, not a general escape hatch for arbitrary existing traits.

Lobsters commenters noted that the mechanism is intentional coherence behavior, not an accidental bypass, and discussed its tradeoffs against newtypes and delegation.