Open
Description
The approach of having multiple extensions implemented in one backend is a bit complex on the side of the dispatcher, because there are multiple implementation of the same methods where just the trait changes, so the compiler can't infer which actual implementation to use. This leads to code like
<StagingBackend as ExtensionImpl<ChunkedExtension>>::extension_request_serialized(
&mut self.backend,
&mut ctx.core,
&mut ctx.backends,
request,
resources,
)
It's also a semver hazard since self.backend.extension_request_serialized(&mut ctx.core, ctx.backends,request,resources)
compile fines if only one extension is enabled through feature-flags, but it doesn't if there are more.
Maybe we should add a dummy extension that is always enabled. That way it forces everyone to use the fully qualified path instead of relying on type inference when only one extension is enabled.
Metadata
Metadata
Assignees
Labels
No labels