fn coerced_option<T>(
sexp: SEXP,
read: impl FnOnce(SEXP) -> Result<T, SexpError>,
) -> Result<Option<T>, SexpError>Expand description
The Option form of a coerce scalar: NULL reads None, any other
input goes through read, the type’s coerced scalar helper, and an NA
that helper refuses reads None, as it does for the bare Option<i32>.