Describe the feature you would like
Right now the EvmFactory trait in the alloy-evm crate has an associated type called Evm that has a generic DB: alloy_evm::Database.
|
type Evm<DB: Database, I: Inspector<Self::Context<DB>>>: Evm< |
This makes it impossible in the concrete implementation to use a trait that is stricter than the alloy_evm::Database trait because of how Rust compiler works with generic defined on associated types (instead of the generic being defined in the trait itself - something like pub trait EvmFactory<DB: Database>.
Do you think it could make sense to change the trait such that it lets implementers use a stricter (meaning it's at least Database, but it may have additional requirements such as thread safety Send + Sync or clonable Clone) trait on the DB.
I'm down to help here if you give me some guidance and find the proposal appealing.
Additional context
No response