Skip to main content

game_arg

Function game_arg 

Source
pub fn game_arg(
    flag: &str,
    options: &[GameOption],
    value: impl FnOnce() -> Result<String, String>,
) -> Result<GameArg, String>
Expand description

The game’s start option flag, one of options, with its value from value if it takes one.

§Errors

unknown option: {flag} if the game doesn’t offer flag, or what value fails with.