Skip to main content

result_err_condition_value

Function result_err_condition_value 

Source
pub unsafe fn result_err_condition_value(
    parts: ErrParts,
    call: Option<SEXP>,
) -> SEXP
Expand description

Build the tagged value for a Result<T, E>::Err from the parts the generated wrapper probed off e (see crate::__mx_result_err_parts!): kind = "result_err", the error’s class vector (empty for the plain Debug fallback), its structured fields, and no call when its RConditionData::call is ConditionCall::None (an RError::without_call).

§Safety

Same contract as make_rust_condition_value_with_data: R main thread, valid allocation context. Every generated Err arm runs inside the wrapper’s with_r_unwind_protect closure, which satisfies it.