IntoField

Trait IntoField 

Source
trait IntoField<T> {
    // Required method
    fn into_field(self) -> T;
}
Expand description

Trait to convert CLI field types to target struct field types. This enables Option<SecretString> (CLI) -> SecretString (target) conversions, allowing us to distinguish “not provided” from “provided but empty”.

Required Methods§

Source

fn into_field(self) -> T

Implementations on Foreign Types§

Source§

impl IntoField<SecretBox<String>> for Option<SecretString>

Convert Option<SecretString> to SecretString, using default for None.

Source§

fn into_field(self) -> SecretString

Implementors§

Source§

impl<T> IntoField<T> for T

Identity conversion for types that are the same.