(input: &DeriveInput)
| 13 | |
| 14 | impl Fields { |
| 15 | pub fn new(input: &DeriveInput) -> Result<Self> { |
| 16 | match input.data { |
| 17 | Data::Struct(ref data_struct) => Self::from_fields(&data_struct.fields), |
| 18 | _ => Err(Error::new_spanned( |
| 19 | input, |
| 20 | "`cli_table` derive macros can only be used on structs", |
| 21 | )), |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | pub fn into_iter(self) -> impl Iterator<Item = Field> { |
| 26 | self.fields.into_iter() |
nothing calls this directly
no test coverage detected