gitql_ast/types/undefined.rs
1use std::any::Any;
2
3use super::base::DataType;
4
5#[derive(Clone)]
6pub struct UndefType;
7
8impl DataType for UndefType {
9 fn literal(&self) -> String {
10 "Undef".to_string()
11 }
12
13 fn equals(&self, other: &Box<dyn DataType>) -> bool {
14 other.as_any().downcast_ref::<UndefType>().is_some()
15 }
16
17 fn as_any(&self) -> &dyn Any {
18 self
19 }
20}