fn guarded_altrep_call<T: Altrep, F, R>(f: F) -> Rwhere
F: FnOnce() -> R,Expand description
Dispatch an ALTREP callback through the guard mode selected by T::GUARD.
Since T::GUARD is a const, the compiler eliminates the unreachable branches
at monomorphization time — zero runtime overhead for the chosen mode.
Unsafe: No protection — the closure runs directly.RustUnwind: Wraps incatch_unwind, converting panics toRf_errorso they don’t unwind through C frames.RUnwind: Wraps inR_UnwindProtect, catching both Rust panics and R longjmps safely.