numpy::datetime

Trait Unit

Source
pub trait Unit:
    Send
    + Sync
    + Clone
    + Copy
    + PartialEq
    + Eq
    + Hash
    + PartialOrd
    + Ord {
    const UNIT: NPY_DATETIMEUNIT;
    const ABBREV: &'static str;
}
Expand description

Represents the datetime units supported by NumPy

Required Associated Constants§

Source

const UNIT: NPY_DATETIMEUNIT

The matching NumPy datetime unit code

Source

const ABBREV: &'static str

The abbrevation used for debug formatting

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Unit for Attoseconds

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_as

Source§

const ABBREV: &'static str = "as"

Source§

impl Unit for Days

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_D

Source§

const ABBREV: &'static str = "d"

Source§

impl Unit for Femtoseconds

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_fs

Source§

const ABBREV: &'static str = "fs"

Source§

impl Unit for Hours

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_h

Source§

const ABBREV: &'static str = "h"

Source§

impl Unit for Microseconds

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_us

Source§

const ABBREV: &'static str = "µs"

Source§

impl Unit for Milliseconds

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_ms

Source§

const ABBREV: &'static str = "ms"

Source§

impl Unit for Minutes

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_m

Source§

const ABBREV: &'static str = "min"

Source§

impl Unit for Months

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_M

Source§

const ABBREV: &'static str = "mo"

Source§

impl Unit for Nanoseconds

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_ns

Source§

const ABBREV: &'static str = "ns"

Source§

impl Unit for Picoseconds

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_ps

Source§

const ABBREV: &'static str = "ps"

Source§

impl Unit for Seconds

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_s

Source§

const ABBREV: &'static str = "s"

Source§

impl Unit for Weeks

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_W

Source§

const ABBREV: &'static str = "w"

Source§

impl Unit for Years

Source§

const UNIT: NPY_DATETIMEUNIT = NPY_DATETIMEUNIT::NPY_FR_Y

Source§

const ABBREV: &'static str = "a"