ion_proc/attribute/trace.rs
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 */
6
7use syn::meta::ParseNestedMeta;
8use syn::parse::Result;
9
10use crate::attribute::{ParseArgument as _, ParseAttribute};
11
12#[derive(Debug, Default)]
13pub(crate) struct TraceAttribute {
14 pub(crate) no_trace: bool,
15}
16
17impl ParseAttribute for TraceAttribute {
18 type Parent<'a> = ();
19
20 fn parse(&mut self, meta: &ParseNestedMeta) -> Result<bool> {
21 self.no_trace.parse_argument(meta, "no_trace", "Field")
22 }
23}