Skip to main content

match_arg_null_or

Function match_arg_null_or 

Source
pub fn match_arg_null_or<U, E>(
    sexp: SEXP,
    inner: impl FnOnce(SEXP) -> Result<U, E>,
) -> Result<Option<U>, E>
Expand description

The Option<_> layer of a choice parameter: NULL is None, anything else is decoded by inner and becomes Some.

Generated C wrappers compose this with the other layer helpers (match_arg_missing_or) around the decoder of the choice itself; match_arg_option_from_sexp is the scalar case.