edr icon indicating copy to clipboard operation
edr copied to clipboard

Adopt dynamic trait object upcasting once released in Rust

Open Wodann opened this issue 1 year ago • 3 comments

Rust has historically not been natively capable of upcasting dynamic trait objects to sub-traits. Work has been culminating to a beta that we expect should be released in the upcoming year.

To circumvent this limitation in Rust, EDR uses super-traits throughout the codebase, while we would like to be more restrictive. Once it's possible to upcast a super-trait to it sub-trait, we should restrict function signatures to the sub-traits

Definition of Done Wherever possible, limit usages of SyncBlockchain, SyncBlock, SyncState, SyncLogger, and SyncInspector in function signatures to their sub-traits

Wodann avatar Feb 05 '24 16:02 Wodann