Skip to main content

TryFromList

Derive Macro TryFromList 

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

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

  • Named structs: extract by field name
  • Tuple structs: extract by position (0, 1, 2, …)
  • Fields annotated #[into_list(ignore)] are not read and are initialized with Default::default()