Skip to main content

PreferRNativeType

Derive Macro PreferRNativeType 

Source
#[derive(PreferRNativeType)]
Expand description

Derive PreferRNativeType: when a newtype wraps an RNativeType and also implements other conversions, this selects the native R vector conversion as the default IntoR path.

§Example

#[derive(Copy, Clone, RNativeType, PreferRNativeType)]
struct Meters(f64);
// IntoR produces a numeric scalar, not an ExternalPtr