pub fn derive_try_from_list(input: DeriveInput) -> Result<TokenStream>Expand description
Derive TryFromList for structs (R -> Rust).
Generates an impl TryFromList for T that extracts struct fields from an R list:
- Named structs: extract by field name from a named R list. A field whose
name appears more than once in the list is a
SexpError::DuplicateNameerror; other names, repeated or not, are ignored. - Tuple structs: extract by position (index 0, 1, 2, …)
- Unit structs: accept any list (no extraction needed)
Fields marked with #[into_list(ignore)] are filled with Default::default().
Each non-ignored field’s type must implement TryFromSexp (enforced via where-clause bounds).
Returns Err if applied to a non-struct type or if an unknown field attribute is found.