Skip to main content

param_is_self_ref

Function param_is_self_ref 

Source
fn param_is_self_ref(ty: &Type) -> (bool, bool)
Expand description

Check if a parameter type is &Self or &mut Self.

Returns (is_self_ref, is_mut). When true, the generated shim extracts an ExternalPtr<T> from the SEXP and borrows from it instead of trying to extract &T directly (which doesn’t implement TryFromSexp).