singleton_variant

Macro singleton_variant 

Source
macro_rules! singleton_variant {
    ($name:ident, $getter:ident, $ty:ident, $variant:ident) => { ... };
}
Expand description

Similar to singleton, but for native types that have variants, such as NativeType::Interval(MonthDayNano).

  • name: name of the static variable, must be unique.
  • getter: name of the public function that will return the singleton instance of the static variable.
  • ty: the NativeType.
  • variant: specific variant of the ty.