1use crate::prelude::*;
2
3#[derive(Clone, Debug, Serialize)]
8pub struct Set {
9 pub def: Def,
10 pub item: Item,
11 pub ty: Type,
12}
13
14impl MacroNode for Set {
15 fn as_any(&self) -> &dyn std::any::Any {
16 self
17 }
18}
19
20impl TypeNode for Set {
21 fn ty(&self) -> &Type {
22 &self.ty
23 }
24}
25
26impl ValidateNode for Set {}
27
28impl VisitableNode for Set {
29 fn route_key(&self) -> String {
30 self.def.path()
31 }
32
33 fn drive<V: Visitor>(&self, v: &mut V) {
34 self.def.accept(v);
35 self.item.accept(v);
36 self.ty.accept(v);
37 }
38}