1use mtl_foundation::{Integer, UInteger};
6
7#[repr(transparent)]
15#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Hash)]
16pub struct LogLevel(pub Integer);
17
18impl LogLevel {
19 pub const UNDEFINED: Self = Self(0);
21 pub const DEBUG: Self = Self(1);
23 pub const INFO: Self = Self(2);
25 pub const NOTICE: Self = Self(3);
27 pub const ERROR: Self = Self(4);
29 pub const FAULT: Self = Self(5);
31}
32
33#[repr(transparent)]
41#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Hash)]
42pub struct LogStateError(pub UInteger);
43
44impl LogStateError {
45 pub const INVALID_SIZE: Self = Self(1);
47 pub const INVALID: Self = Self(2);
49}
50
51#[repr(transparent)]
59#[derive(Copy, Clone, Debug, Default, PartialEq, Eq, Hash)]
60pub struct FunctionLogType(pub UInteger);
61
62impl FunctionLogType {
63 pub const VALIDATION: Self = Self(0);
65}
66
67#[cfg(test)]
68mod tests {
69 use super::*;
70
71 #[test]
72 fn test_log_level_values() {
73 assert_eq!(LogLevel::UNDEFINED.0, 0);
74 assert_eq!(LogLevel::DEBUG.0, 1);
75 assert_eq!(LogLevel::INFO.0, 2);
76 assert_eq!(LogLevel::NOTICE.0, 3);
77 assert_eq!(LogLevel::ERROR.0, 4);
78 assert_eq!(LogLevel::FAULT.0, 5);
79 }
80
81 #[test]
82 fn test_log_state_error_values() {
83 assert_eq!(LogStateError::INVALID_SIZE.0, 1);
84 assert_eq!(LogStateError::INVALID.0, 2);
85 }
86
87 #[test]
88 fn test_function_log_type_values() {
89 assert_eq!(FunctionLogType::VALIDATION.0, 0);
90 }
91}