Skip to main content

assert_no_aliases

Function assert_no_aliases 

Source
#[doc(hidden)]
pub unsafe fn assert_no_aliases<const N: usize>( args: [(SEXP, &str); N], borrows: [Option<NativeBorrow>; N], )
Expand description

Reject every conflicting argument pair before any Rust borrow is constructed.

An Either anywhere in the metadata is checked against both arms. A generated wrapper first calls assert_or_select and replaces a prepared argument’s metadata with the arm its conversion takes.

§Safety

Run on R’s main thread inside an R unwind-protected wrapper. Argument SEXPs must stay reachable for the whole call. Metadata must describe the actual conversions of the corresponding arguments.