Skip to main content

__mx_missing_or

Function __mx_missing_or 

Source
#[doc(hidden)]
pub fn __mx_missing_or<T, E>( sexp: SEXP, read: impl FnOnce(SEXP) -> Result<T, E>, ) -> Result<Missing<T>, E>
Expand description

Read an argument that may be the missing-argument sentinel: the sentinel is Missing::Absent, any other value read’s result as Missing::Present. For generated code that converts a Missing<T> parameter with its own reader instead of T’s TryFromSexp: a coerce parameter’s coerced helper (#2274), a choice parameter’s decoder (match_arg_missing_or).