(node: &'a DeriveInput)
| 53 | |
| 54 | impl<'a> Input<'a> { |
| 55 | pub fn from_syn(node: &'a DeriveInput) -> Result<Self> { |
| 56 | match &node.data { |
| 57 | Data::Struct(data) => Struct::from_syn(node, data).map(Input::Struct), |
| 58 | Data::Enum(data) => Enum::from_syn(node, data).map(Input::Enum), |
| 59 | Data::Union(_) => Err(Error::new_spanned( |
| 60 | node, |
| 61 | "union as errors are not supported", |
| 62 | )), |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | impl<'a> Struct<'a> { |
nothing calls this directly
no test coverage detected