Method
field_attrs
(
&self,
fields: &Fields,
attrs: &BitcodeAttrs,
bounds: &mut FieldBounds,
)
Source from the content-addressed store, hash-verified
| 74 | ) -> TokenStream; |
| 75 | |
| 76 | fn field_attrs( |
| 77 | &self, |
| 78 | fields: &Fields, |
| 79 | attrs: &BitcodeAttrs, |
| 80 | bounds: &mut FieldBounds, |
| 81 | ) -> Result<Vec<BitcodeAttrs>> { |
| 82 | fields |
| 83 | .iter() |
| 84 | .map(|field| { |
| 85 | let field_attrs = BitcodeAttrs::parse_field(&field.attrs, attrs)?; |
| 86 | bounds.add_bound_type(field.clone(), &field_attrs, self.bound()); |
| 87 | Ok(field_attrs) |
| 88 | }) |
| 89 | .collect() |
| 90 | } |
| 91 | |
| 92 | fn derive(&self, mut input: DeriveInput) -> Result<TokenStream> { |
| 93 | let attrs = BitcodeAttrs::parse_derive(&input.attrs)?; |
Tested by
no test coverage detected