icydb_schema/node/
sanitizer.rs1use crate::prelude::*;
2
3#[derive(Clone, Debug, Serialize)]
11pub struct Sanitizer {
12 def: Def,
13}
14
15impl Sanitizer {
16 #[must_use]
18 pub const fn new(def: Def) -> Self {
19 Self { def }
20 }
21
22 #[must_use]
24 pub const fn def(&self) -> &Def {
25 &self.def
26 }
27}
28
29impl MacroNode for Sanitizer {
30 fn as_any(&self) -> &dyn std::any::Any {
31 self
32 }
33}
34
35impl ValidateNode for Sanitizer {}
36
37impl VisitableNode for Sanitizer {
38 fn route_key(&self) -> String {
39 self.def().path()
40 }
41
42 fn drive<V: Visitor>(&self, v: &mut V) {
43 self.def().accept(v);
44 }
45}