pub trait IntoKeyValue<T: KeyValue> {
// Required method
fn into_key_value(self) -> T;
}Expand description
What a key’s default may be written as.
env_key("depth", 3) and env_key("greeting", "hello") should both work, and
Into cannot do it: 3.into() with an i64 target is ambiguous, because
every integer width has a From into i64. This has one impl per
destination, so the literal’s type is decided by the key’s.
Required Methods§
Sourcefn into_key_value(self) -> T
fn into_key_value(self) -> T
The value itself.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".