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: adds the PrefersExternalPtr marker trait and an IntoR impl that wraps the value in ExternalPtr::new before converting to SEXP.

The type must implement TypedExternal (typically via #[derive(ExternalPtr)]). The generated IntoR::Error is Infallible.