Skip to main content

check_options

Function check_options 

Source
pub fn check_options<'a>(
    operation: &str,
    allowed: &[&str],
    keys: impl IntoIterator<Item = &'a str>,
) -> Result<bool>
Expand description

Perl CheckOptions($operation, $allowed, %options): one Error:misdefined naming every key allowed lacks. Returns whether all keys were allowed (Err only when the error cap escalates); the definition proceeds either way, as in Perl, with the rejected keys ignored.