[−][src]Trait modtype::ConstValue
A trait that has one associated constant value.
This trait requires Copy
+
Ord
+
Debug
because of #26925
.
To implement this trait, use use_modtype
rather than the derive macro.
Example
use modtype::ConstValue; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, ConstValue)] #[modtype(const_value = 17u32)] enum Const17U32 {} assert_eq!(Const17U32::VALUE, 17u32);