Represents the [datetime units][datetime-units] supported by NumPy [datetime-units]: https://numpy.org/doc/stable/reference/arrays.datetime.html#datetime-units
| 73 | /// |
| 74 | /// [datetime-units]: https://numpy.org/doc/stable/reference/arrays.datetime.html#datetime-units |
| 75 | pub trait Unit: Send + Sync + Clone + Copy + PartialEq + Eq + Hash + PartialOrd + Ord { |
| 76 | /// The matching NumPy [datetime unit code][NPY_DATETIMEUNIT] |
| 77 | /// |
| 78 | /// [NPY_DATETIMEUNIT]: https://github.com/numpy/numpy/blob/4c60b3263ac50e5e72f6a909e156314fc3c9cba0/numpy/core/include/numpy/ndarraytypes.h#L276 |
| 79 | const UNIT: NPY_DATETIMEUNIT; |
| 80 | |
| 81 | /// The abbreviation used for debug formatting |
| 82 | const ABBREV: &'static str; |
| 83 | } |
| 84 | |
| 85 | macro_rules! define_units { |
| 86 | ($($(#[$meta:meta])* $struct:ident => $unit:ident $abbrev:literal,)+) => { |
nothing calls this directly
no outgoing calls
no test coverage detected