Skip to main content

IndexToUsize

Trait IndexToUsize 

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) -> Result<usize, PolarsError>
       where Self: Sized + Copy { ... }
}

Required Methods§

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

Translate the negative index to an offset.

Provided Methods§

fn try_negative_to_usize(self, len: usize) -> Result<usize, PolarsError>
where Self: Sized + Copy,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl<I> IndexToUsize for I