polars_arrow::legacy::index

Trait IndexToUsize

Source
pub trait IndexToUsize: Display {
    // Required method
    fn negative_to_usize(self, len: usize) -> Option<usize>;

    // Provided method
    fn try_negative_to_usize(self, len: usize) -> PolarsResult<usize>
       where Self: Sized + Copy { ... }
}

Required Methods§

Source

fn negative_to_usize(self, len: usize) -> Option<usize>

Translate the negative index to an offset.

Provided Methods§

Implementors§