pub trait StructOptToml {
// Required method
fn merge<'a>(
from_toml: Self,
from_args: Self,
args: &ArgMatches<'_>,
) -> Self
where Self: Sized + StructOpt + Deserialize<'a>;
// Provided methods
fn from_clap_with_toml<'a>(
toml_str: &'a str,
args: &ArgMatches<'_>,
) -> Result<Self, Error>
where Self: Sized + StructOpt + Deserialize<'a> { ... }
fn from_args_with_toml<'a>(toml_str: &'a str) -> Result<Self, Error>
where Self: Sized + StructOpt + Deserialize<'a> { ... }
fn from_iter_with_toml<'a, I>(
toml_str: &'a str,
iter: I,
) -> Result<Self, Error>
where Self: Sized + StructOpt + Deserialize<'a>,
I: IntoIterator,
I::Item: Into<OsString> + Clone { ... }
}
Required Methods§
Sourcefn merge<'a>(from_toml: Self, from_args: Self, args: &ArgMatches<'_>) -> Self
fn merge<'a>(from_toml: Self, from_args: Self, args: &ArgMatches<'_>) -> Self
Merge the struct from TOML and the struct from args
Provided Methods§
Sourcefn from_clap_with_toml<'a>(
toml_str: &'a str,
args: &ArgMatches<'_>,
) -> Result<Self, Error>
fn from_clap_with_toml<'a>( toml_str: &'a str, args: &ArgMatches<'_>, ) -> Result<Self, Error>
Creates the struct from clap::ArgMatches
with initial values from TOML.
Sourcefn from_args_with_toml<'a>(toml_str: &'a str) -> Result<Self, Error>
fn from_args_with_toml<'a>(toml_str: &'a str) -> Result<Self, Error>
Creates the struct from command line arguments with initial values from TOML.
Sourcefn from_iter_with_toml<'a, I>(toml_str: &'a str, iter: I) -> Result<Self, Error>
fn from_iter_with_toml<'a, I>(toml_str: &'a str, iter: I) -> Result<Self, Error>
Creates the struct from iterator with initial values from TOML.