MCPcopy Create free account
hub / github.com/dtolnay/thiserror / from_syn

Method from_syn

impl/src/ast.rs:55–64  ·  view source on GitHub ↗
(node: &'a DeriveInput)

Source from the content-addressed store, hash-verified

53
54impl<'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
67impl<'a> Struct<'a> {

Callers

nothing calls this directly

Calls 3

getFunction · 0.85
expand_shorthandMethod · 0.80
intersectsMethod · 0.80

Tested by

no test coverage detected