[−][src]Function shellfn_core::execute_parse_panic
pub fn execute_parse_panic<T, TArg, TEnvKey, TEnvVal>(
cmd: impl AsRef<OsStr>,
args: impl IntoIterator<Item = TArg>,
envs: impl IntoIterator<Item = (TEnvKey, TEnvVal)>
) -> T where
T: FromStr,
TArg: AsRef<OsStr>,
TEnvKey: AsRef<OsStr>,
TEnvVal: AsRef<OsStr>,
<T as FromStr>::Err: StdError,
Executes command with args and environment variables, parses output
- On invalid command: panic
- On error exit code: panic
- On parsing failure: panic
- Possible errors: N/A
Designed for
use shellfn::shell; #[shell] fn command() -> u32 { "echo -n 42" } assert_eq!(42, command())