renderdoc-rs icon indicating copy to clipboard operation
renderdoc-rs copied to clipboard

Allow compile-time version selection for shutdown/remove_hooks

Open ebkalderon opened this issue 4 years ago • 1 comments

Support for in-application API version 1.4.1 was introduced in #91, which included the renaming of shutdown to remove_hooks. This rename cannot be handled the same way as previous renames, where the old method can be retroactively marked deprecated if the requested API version is 1.4.1 or higher, because both of these methods take an owned self.

This means that the existing Deref and DerefMut implementations for RenderDoc<V> aren't sufficient for either method to work properly, and it would require a DerefMove trait to be added to the standard library (see https://github.com/rust-lang/rfcs/issues/997 for details).

For now, as per #92, the remove_hooks() method is not available to call, even if RenderDoc<V141> is selected at compile-time. In the future, once DerefMove is added to Rust or an alternative solution can be found, we will be able to restore the full set of changes from #91 and expose both remove_hooks and shutdown correctly.

ebkalderon avatar May 06 '20 02:05 ebkalderon