Skip to main content

derive_prefer_externalptr

Function derive_prefer_externalptr 

Source
pub fn derive_prefer_externalptr(input: DeriveInput) -> Result<TokenStream>
Expand description

Derive PreferExternalPtr: emits an IntoR impl that wraps the value in ExternalPtr::new before converting to SEXP.

The type must have a hand-written TypedExternal impl; ExternalPtr derive already supplies IntoR and must not be combined with this derive. The generated IntoR::Error is Infallible.