Skip to main content

generate_helpers

Macro generate_helpers 

Source
macro_rules! generate_helpers {
    () => { ... };
}
Expand description

A macro to generate default helper implementations for provider impls.

The reason for this macro is that traits don’t play well with generics and Sized, preventing us from providing default implementations in the trait. There are ways around this, but they either involve messy downcasting or lots of match arms that need to be updated as providers are added. As we want to keep the process of adding providers as self-contained as possible this is the simplest method for now.