Skip to main content

IntoList

Derive Macro IntoList 

Source
#[derive(IntoList)]
{
    // Attributes available to this derive:
    #[into_list]
}
Expand description

Derive IntoList for a struct (Rust → R list).

  • Named structs → named R list: list(x = 1L, y = 2L)
  • Tuple structs → unnamed R list: list(1L, 2L)
  • Fields annotated #[into_list(ignore)] are skipped
  • #[into_list(class = "a")] / #[into_list(class = ["a", "b"])] on the struct sets the list’s class attribute to exactly those classes