Skip to main content

require_safe_wrapper

Function require_safe_wrapper 

Source
pub(crate) fn require_safe_wrapper(
    sig: &Signature,
    rust_only: &str,
) -> Result<()>
Expand description

Rejects an unsafe fn that would get a generated wrapper (#2124): its R callers cannot uphold Rust safety preconditions. rust_only says how this kind of item stays out of R instead. Raw extern "C-unwind" registration has its own explicit contract and is not checked here.