arrow_arith::numeric

Trait DateOp

Source
trait DateOp: ArrowTemporalType {
    // Required methods
    fn add_year_month(timestamp: Self::Native, delta: i32) -> Self::Native;
    fn add_day_time(
        timestamp: Self::Native,
        delta: IntervalDayTime,
    ) -> Self::Native;
    fn add_month_day_nano(
        timestamp: Self::Native,
        delta: IntervalMonthDayNano,
    ) -> Self::Native;
    fn sub_year_month(timestamp: Self::Native, delta: i32) -> Self::Native;
    fn sub_day_time(
        timestamp: Self::Native,
        delta: IntervalDayTime,
    ) -> Self::Native;
    fn sub_month_day_nano(
        timestamp: Self::Native,
        delta: IntervalMonthDayNano,
    ) -> Self::Native;
}
Expand description

Arithmetic trait for date arrays

Note: these should be fallible (#4456)

Required Methods§

Source

fn add_year_month(timestamp: Self::Native, delta: i32) -> Self::Native

Source

fn add_day_time(timestamp: Self::Native, delta: IntervalDayTime) -> Self::Native

Source

fn add_month_day_nano( timestamp: Self::Native, delta: IntervalMonthDayNano, ) -> Self::Native

Source

fn sub_year_month(timestamp: Self::Native, delta: i32) -> Self::Native

Source

fn sub_day_time(timestamp: Self::Native, delta: IntervalDayTime) -> Self::Native

Source

fn sub_month_day_nano( timestamp: Self::Native, delta: IntervalMonthDayNano, ) -> Self::Native

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl DateOp for Date32Type

Source§

fn add_year_month(left: Self::Native, right: i32) -> Self::Native

Source§

fn add_day_time(left: Self::Native, right: IntervalDayTime) -> Self::Native

Source§

fn add_month_day_nano( left: Self::Native, right: IntervalMonthDayNano, ) -> Self::Native

Source§

fn sub_year_month(left: Self::Native, right: i32) -> Self::Native

Source§

fn sub_day_time(left: Self::Native, right: IntervalDayTime) -> Self::Native

Source§

fn sub_month_day_nano( left: Self::Native, right: IntervalMonthDayNano, ) -> Self::Native

Source§

impl DateOp for Date64Type

Source§

fn add_year_month(left: Self::Native, right: i32) -> Self::Native

Source§

fn add_day_time(left: Self::Native, right: IntervalDayTime) -> Self::Native

Source§

fn add_month_day_nano( left: Self::Native, right: IntervalMonthDayNano, ) -> Self::Native

Source§

fn sub_year_month(left: Self::Native, right: i32) -> Self::Native

Source§

fn sub_day_time(left: Self::Native, right: IntervalDayTime) -> Self::Native

Source§

fn sub_month_day_nano( left: Self::Native, right: IntervalMonthDayNano, ) -> Self::Native

Implementors§