Skip to main content

PreferList

Derive Macro PreferList 

Source
#[derive(PreferList)]
Expand description

Derive PrefersList: when a type implements both IntoList and ExternalPtr, this selects list as the default IntoR conversion.

Without a Prefer* derive, types that implement multiple conversion paths will get a compile error due to conflicting IntoR impls.

§Example

#[derive(IntoList, PreferList)]
struct Config { verbose: bool, threads: i32 }
// IntoR produces list(verbose = TRUE, threads = 4L)