icydb_schema/node/validator.rs
1use crate::prelude::*;
2
3///
4/// Validator
5///
6
7#[derive(Clone, Debug, Serialize)]
8pub struct Validator {
9 pub def: Def,
10}
11
12impl MacroNode for Validator {
13 fn as_any(&self) -> &dyn std::any::Any {
14 self
15 }
16}
17
18impl ValidateNode for Validator {}
19
20impl VisitableNode for Validator {
21 fn route_key(&self) -> String {
22 self.def.path()
23 }
24
25 fn drive<V: Visitor>(&self, v: &mut V) {
26 self.def.accept(v);
27 }
28}