rust-windowing/raw-window-handle

Proposal: Make the error type implementor-selectable?

madsmtm opened this issue · 2 comments

Instead of defining the allowed errors returnable by the window handle traits, maybe we should make it an associated type Error instead, similar to e.g. TryFrom::Error? Then libraries that never return an error could make that be Infallible.

This would make the trait not object safe, which I would be skeptical about. Especially since most current implementors of the traits should be providing errors, just in case.

Right, conflicts with object safety too, and you do make some fair points