datarust_profile/
types.rs1use std::fmt;
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq)]
11#[cfg_attr(feature = "serde", derive(serde::Serialize))]
12pub enum ColumnType {
13 Numeric,
15 Categorical,
17}
18
19impl fmt::Display for ColumnType {
20 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
21 match self {
22 ColumnType::Numeric => f.write_str("numeric"),
23 ColumnType::Categorical => f.write_str("categorical"),
24 }
25 }
26}
27
28#[derive(Debug, Clone, Copy, PartialEq, Eq)]
30#[cfg_attr(feature = "serde", derive(serde::Serialize))]
31pub enum Severity {
32 Info,
34 Warning,
36 Critical,
38}
39
40impl fmt::Display for Severity {
41 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
42 match self {
43 Severity::Info => f.write_str("info"),
44 Severity::Warning => f.write_str("warning"),
45 Severity::Critical => f.write_str("critical"),
46 }
47 }
48}