Skip to main content

borrow

Function borrow 

Source
pub(crate) fn borrow(name: &Ident, mutable: bool) -> TokenStream
Expand description

Borrow a &Self argument’s value for the rest of the shim, exclusively for &mut Self, as a C wrapper borrows a &T / &mut T argument (#2106): a call still running on the object makes the borrow raise the miniextendr_borrow_conflict error. The handle argument made roots the pointer of a class-wrapped argument. Runs after alias_checks.