Trait pyo3::types::PyTzInfoAccess
source · pub trait PyTzInfoAccess<'py> {
// Required method
fn get_tzinfo_bound(&self) -> Option<Bound<'py, PyTzInfo>>;
// Provided method
fn get_tzinfo(&self) -> Option<&'py PyTzInfo> { ... }
}
Expand description
Trait for accessing the components of a struct containing a tzinfo.
Required Methods§
sourcefn get_tzinfo_bound(&self) -> Option<Bound<'py, PyTzInfo>>
fn get_tzinfo_bound(&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§
sourcefn get_tzinfo(&self) -> Option<&'py PyTzInfo>
fn get_tzinfo(&self) -> Option<&'py PyTzInfo>
👎Deprecated since 0.21.0:
get_tzinfo
will be replaced by get_tzinfo_bound
in a future PyO3 versionDeprecated form of get_tzinfo_bound
.