pub trait FactoryLayer<C, F> {
type Factory;
// Required method
fn layer(&self, config: &C, inner: F) -> Self::Factory;
}Expand description
A trait for creating layered factory wrappers, enabling complex service compositions.
FactoryLayer defines how to wrap one factory with another, creating a new composite factory.
This allows for the creation of reusable, modular pieces of functionality that can be easily combined.
Unlike Tower’s Layer which creates a Service wrapping an inner Service,
FactoryLayer creates a Factory wrapping an inner Factory, which can then be used
to create the entire Service chain.