pub trait OptionsConfigurationServiceExtensions {
// Required methods
fn apply_config<T>(
&mut self,
configuration: Ref<dyn Configuration>
) -> OptionsBuilder<'_, T>
where T: Default + DeserializeOwned + 'static;
fn apply_config_at<T>(
&mut self,
configuration: Ref<dyn Configuration>,
key: impl AsRef<str>
) -> OptionsBuilder<'_, T>
where T: Default + DeserializeOwned + 'static;
}Available on crate feature
cfg only.Expand description
Defines extension methods for the ServiceCollection struct.
Required Methods§
sourcefn apply_config<T>(
&mut self,
configuration: Ref<dyn Configuration>
) -> OptionsBuilder<'_, T>where
T: Default + DeserializeOwned + 'static,
fn apply_config<T>(
&mut self,
configuration: Ref<dyn Configuration>
) -> OptionsBuilder<'_, T>where
T: Default + DeserializeOwned + 'static,
Registers an options type that will have all of its associated services registered.
Arguments
configuration- The configuration applied to the options
sourcefn apply_config_at<T>(
&mut self,
configuration: Ref<dyn Configuration>,
key: impl AsRef<str>
) -> OptionsBuilder<'_, T>where
T: Default + DeserializeOwned + 'static,
fn apply_config_at<T>(
&mut self,
configuration: Ref<dyn Configuration>,
key: impl AsRef<str>
) -> OptionsBuilder<'_, T>where
T: Default + DeserializeOwned + 'static,
Registers an options type that will have all of its associated services registered.
Arguments
configuration- The configuration applied to the optionskey- The key to the part of the configuration applied to the options
Object Safety§
This trait is not object safe.