pub trait ServiceCollectionModuleExt {
// Required method
fn add_module_mut<M: ServiceModule>(
&mut self,
module: M,
) -> DiResult<&mut Self>;
}Expand description
Additional extension trait for ServiceCollection that provides fluent module registration that matches the existing &mut Self pattern.
Required Methods§
Sourcefn add_module_mut<M: ServiceModule>(&mut self, module: M) -> DiResult<&mut Self>
fn add_module_mut<M: ServiceModule>(&mut self, module: M) -> DiResult<&mut Self>
Add a module to the service collection in-place. Returns a DiResult to handle any registration errors.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.