1 #![allow(dead_code)] 2 3 #[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)] 4 pub(crate) enum Type { 5 Bool, 6 Char, 7 Integer, 8 String, 9 10 BuildInfo, 11 CrateInfo, 12 CompilerInfo, 13 CompilerChannel, 14 VersionControl, 15 GitInfo, 16 17 Version, 18 DateTimeUtc, 19 20 Option, 21 Vec, 22 } 23 24 use std::fmt; 25 impl fmt::Display for Type { fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result26 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 27 match self { 28 Type::Bool => write!(f, "bool"), 29 Type::Char => write!(f, "char"), 30 Type::Integer => write!(f, "integer"), 31 Type::String => write!(f, "string"), 32 33 Type::BuildInfo => write!(f, "build_info::BuildInfo"), 34 Type::CrateInfo => write!(f, "build_info::CrateInfo"), 35 Type::CompilerInfo => write!(f, "build_info::CompilerInfo"), 36 Type::CompilerChannel => write!(f, "build_info::CompilerChannel"), 37 Type::VersionControl => write!(f, "build_info::VersionControl"), 38 Type::GitInfo => write!(f, "build_info::GitInfo"), 39 40 Type::Version => write!(f, "build_info::semver::Version"), 41 Type::DateTimeUtc => write!(f, "build_info::chrono::DateTime<build_info::chrono::Utc>"), 42 43 Type::Option => write!(f, "Option<_>"), 44 Type::Vec => write!(f, "Vec<_>"), 45 } 46 } 47 } 48