pub trait Context {
// Required method
fn get(&self, key: &str) -> Option<String>;
}Expand description
A trait for providing values for variable expansion.
This allows format_with to be generic over the source of the
variables, making it easy to test with a HashMap or use with environment
variables.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".