Type-narrowing helper — cast a public DetachHandle to its
implementation. Drivers (only) use this to call internal mutators.
Throws if the handle isn't actually a HandleImpl — defends
against consumers passing a hand-rolled object that satisfies the
interface shape but lacks the mutators.
Type-narrowing helper — cast a public
DetachHandleto its implementation. Drivers (only) use this to call internal mutators.Throws if the handle isn't actually a
HandleImpl— defends against consumers passing a hand-rolled object that satisfies the interface shape but lacks the mutators.