This could probably be `cx.bug("expected StaticEnum or StaticStruct")`. (And similarly in `encodable.rs`.)