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

Function backtrace_field

impl/src/prop.rs:112–124  ·  view source on GitHub ↗
(fields: &'a [Field<'b>])

Source from the content-addressed store, hash-verified

110}
111
112fn backtrace_field<'a, 'b>(fields: &'a [Field<'b>]) -> Option<&'a Field<'b>> {
113 for field in fields {
114 if field.attrs.backtrace.is_some() {
115 return Some(field);
116 }
117 }
118 for field in fields {
119 if field.is_backtrace() {
120 return Some(field);
121 }
122 }
123 None
124}
125
126// The #[backtrace] field, if it is not the same as the #[from] field.
127fn distinct_backtrace_field<'a, 'b>(

Callers 1

backtrace_fieldMethod · 0.85

Calls 1

is_backtraceMethod · 0.80

Tested by

no test coverage detected