macro_rules! handle_opt_take {
($option:expr, $variant:ident, $some_value:ident$(,)? $($arg:ident$(: $value:expr)?),*) => { ... };
}Expand description
This macro is an opposite of handle_opt! - it returns an error if the option contains a Some variant.
Note that this macro calls Option::take, which will leave a None if the option was Some(value).
Note that this macro has a mandatory argument $some_value (used in if let Some($some_value) = $option.take()), which will also be passed to the error enum variant.