devela::_dep::pyo3::types

Trait PyTzInfoAccess

pub trait PyTzInfoAccess<'py> {
    // Required method
    fn get_tzinfo(&self) -> Option<Bound<'py, PyTzInfo>> ;

    // Provided method
    fn get_tzinfo_bound(&self) -> Option<Bound<'py, PyTzInfo>>  { ... }
}
Available on crate features dep_pyo3 and std only.
Expand description

Trait for accessing the components of a struct containing a tzinfo.

Required Methods§

fn get_tzinfo(&self) -> Option<Bound<'py, PyTzInfo>>

Returns the tzinfo (which may be None).

Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_DATE_GET_TZINFO https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_TIME_GET_TZINFO

Provided Methods§

fn get_tzinfo_bound(&self) -> Option<Bound<'py, PyTzInfo>>

👎Deprecated since 0.23.0: renamed to PyTzInfoAccess::get_tzinfo

Deprecated name for PyTzInfoAccess::get_tzinfo.

Implementors§

§

impl<'py> PyTzInfoAccess<'py> for Bound<'py, PyDateTime>

§

impl<'py> PyTzInfoAccess<'py> for Bound<'py, PyTime>