(fields: &Fields)
| 176 | } |
| 177 | |
| 178 | fn from_fields(fields: &Fields) -> Result<Vec<Self>> { |
| 179 | fields |
| 180 | .views() |
| 181 | .into_iter() |
| 182 | .zip(fields.iter()) |
| 183 | .map(|(view, syn_field)| { |
| 184 | Ok(Self { |
| 185 | var: view.binding, |
| 186 | ty: view.ty.clone(), |
| 187 | arg: ParseArg::from_attributes(&syn_field.attrs)?, |
| 188 | atom: extract_atom(&syn_field.attrs)?, |
| 189 | }) |
| 190 | }) |
| 191 | .collect() |
| 192 | } |
| 193 | |
| 194 | fn atom_path_string(&self) -> Option<String> { |
| 195 | self.atom.as_ref().map(|a| quote!(#a).to_string()) |