Skip to main content

try_from_scalar_opt

Macro try_from_scalar_opt 

Source
macro_rules! try_from_scalar_opt {
    ($t:ty, $variant:ident, $ty:expr) => { ... };
}
Expand description

TryFrom<RValue> for a scalar pulled from a length-1 Option-backed variant.

Fails with Length for a non-scalar, Na for NA, Type for the wrong variant — the failure modes a numeric CoerceError can’t express, which is why this is TryFrom/SexpError rather than a coerce.rs impl.