pub trait ValueResolver: Send + Sync {
// Required method
fn resolve_to_string(
&self,
value: &ConfigValue<String>,
) -> Result<String, ResolverError>;
}Expand description
Trait for resolving a specific type of ConfigValue variant to its actual string value.
Each resolver handles one variant (e.g., EnvironmentVariable or Secret).
The DtoMapper dispatches to the appropriate resolver
based on the variant.
Required Methods§
Sourcefn resolve_to_string(
&self,
value: &ConfigValue<String>,
) -> Result<String, ResolverError>
fn resolve_to_string( &self, value: &ConfigValue<String>, ) -> Result<String, ResolverError>
Resolve a ConfigValue variant to its actual string value.
Returns Err(ResolverError::WrongResolverType) if called with a variant
this resolver doesn’t handle.