pub trait PyDeltaAccess {
// Required methods
fn get_days(&self) -> i32;
fn get_seconds(&self) -> i32;
fn get_microseconds(&self) -> i32;
}
Expand description
Trait for accessing the components of a struct containing a timedelta.
Note: These access the individual components of a (day, second, microsecond) representation of the delta, they are not intended as aliases for calculating the total duration in each of these units.
Required Methods§
Sourcefn get_days(&self) -> i32
fn get_days(&self) -> i32
Returns the number of days, as an int from -999999999 to 999999999.
Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_DELTA_GET_DAYS
Sourcefn get_seconds(&self) -> i32
fn get_seconds(&self) -> i32
Returns the number of seconds, as an int from 0 through 86399.
Implementations should conform to the upstream documentation: https://docs.python.org/3/c-api/datetime.html#c.PyDateTime_DELTA_GET_DAYS
Sourcefn get_microseconds(&self) -> i32
fn get_microseconds(&self) -> i32
Returns the number of microseconds, 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_DELTA_GET_DAYS