Static pyo3::ffi::PyDateTimeAPI[][src]

pub static PyDateTimeAPI: _PyDateTimeAPI_impl
Expand description

Safe wrapper around the Python datetime C-API global. Note that this object differs slightly from the equivalent C object: in C, this is implemented as a static PyDateTime_CAPI *. Here this is implemented as a wrapper which implements Deref to access a reference to a PyDateTime_CAPI object.

In the Deref implementation, if the underlying object has not yet been initialized, the GIL will automatically be acquired and PyDateTime_IMPORT() called.