Trait PyTimeAccess
pub trait PyTimeAccess {
// Required methods
fn get_hour(&self) -> u8 ⓘ;
fn get_minute(&self) -> u8 ⓘ;
fn get_second(&self) -> u8 ⓘ;
fn get_microsecond(&self) -> u32 ⓘ;
fn get_fold(&self) -> bool;
}
dep_pyo3
and std
only.Expand description
Trait for accessing the time components of a struct containing a time.
Required Methods§
fn get_hour(&self) -> u8 ⓘ
fn get_hour(&self) -> u8 ⓘ
Returns the hour, as an int from 0 through 23.
Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_DATE_GET_HOUR
fn get_minute(&self) -> u8 ⓘ
fn get_minute(&self) -> u8 ⓘ
Returns the minute, as an int from 0 through 59.
Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_DATE_GET_MINUTE
fn get_second(&self) -> u8 ⓘ
fn get_second(&self) -> u8 ⓘ
Returns the second, as an int from 0 through 59.
Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_DATE_GET_SECOND
fn get_microsecond(&self) -> u32 ⓘ
fn get_microsecond(&self) -> u32 ⓘ
Returns the microsecond, as an int from 0 through 999999.
Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_DATE_GET_MICROSECOND