Skip to main content

ThreadConfigLoader

Trait ThreadConfigLoader 

Source
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§

Source

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§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§