pub trait ThreadConfigLoader: Send + Sync {
// Required method
fn load(
&self,
context: ThreadConfigContext,
) -> ThreadConfigLoaderFuture<'_, Vec<ThreadConfigSource>>;
// Provided method
fn load_config_layers(
&self,
context: ThreadConfigContext,
) -> ThreadConfigLoaderFuture<'_, Vec<ConfigLayerEntry>> { ... }
}Expand description
Loads typed config sources for a new thread.
Implementations should fetch only the source-specific config they own and return typed payloads without applying precedence or merge rules. Callers are responsible for resolving the returned sources into the effective runtime config.
Required Methods§
Sourcefn load(
&self,
context: ThreadConfigContext,
) -> ThreadConfigLoaderFuture<'_, Vec<ThreadConfigSource>>
fn load( &self, context: ThreadConfigContext, ) -> ThreadConfigLoaderFuture<'_, Vec<ThreadConfigSource>>
Load source-specific typed config.
Implementations should keep this method focused on fetching and parsing
their owned sources. Most callers should use Self::load_config_layers
so precedence and merging continue through the ordinary config layer
stack.
Provided Methods§
fn load_config_layers( &self, context: ThreadConfigContext, ) -> ThreadConfigLoaderFuture<'_, Vec<ConfigLayerEntry>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".