extendr_api::prelude::col

Trait ColIndex

pub trait ColIndex<RowRange>: Sized + Seal {
    type Target;

    // Required method
    fn get(this: Self, row: RowRange) -> Self::Target;

    // Provided method
    unsafe fn get_unchecked(this: Self, row: RowRange) -> Self::Target { ... }
}
Expand description

Represents a type that can be used to slice a column, such as an index or a range of indices.

Required Associated Types§

type Target

Resulting type of the indexing operation.

Required Methods§

fn get(this: Self, row: RowRange) -> Self::Target

Index the column at row.

Provided Methods§

unsafe fn get_unchecked(this: Self, row: RowRange) -> Self::Target

Index the column at row, without bound checks.

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.

Implementors§

§

impl<'a, E> ColIndex<usize> for ColMut<'a, E>
where E: Entity,

§

type Target = <<E as Entity>::Group as ForType>::FaerOf<&'a mut <E as Entity>::Unit>

§

impl<'a, E> ColIndex<usize> for ColRef<'a, E>
where E: Entity,

§

type Target = <<E as Entity>::Group as ForType>::FaerOf<&'a <E as Entity>::Unit>

§

impl<E> ColIndex<Range<usize>> for ColMut<'_, E>
where E: Entity,

§

type Target = ColMut<'_, E>

§

impl<E> ColIndex<Range<usize>> for ColRef<'_, E>
where E: Entity,

§

type Target = ColRef<'_, E>

§

impl<E> ColIndex<RangeFrom<usize>> for ColMut<'_, E>
where E: Entity,

§

type Target = ColMut<'_, E>

§

impl<E> ColIndex<RangeFrom<usize>> for ColRef<'_, E>
where E: Entity,

§

type Target = ColRef<'_, E>

§

impl<E> ColIndex<RangeFull> for ColMut<'_, E>
where E: Entity,

§

type Target = ColMut<'_, E>

§

impl<E> ColIndex<RangeFull> for ColRef<'_, E>
where E: Entity,

§

type Target = ColRef<'_, E>

§

impl<E> ColIndex<RangeInclusive<usize>> for ColMut<'_, E>
where E: Entity,

§

type Target = ColMut<'_, E>

§

impl<E> ColIndex<RangeInclusive<usize>> for ColRef<'_, E>
where E: Entity,

§

type Target = ColRef<'_, E>

§

impl<E> ColIndex<RangeTo<usize>> for ColMut<'_, E>
where E: Entity,

§

type Target = ColMut<'_, E>

§

impl<E> ColIndex<RangeTo<usize>> for ColRef<'_, E>
where E: Entity,

§

type Target = ColRef<'_, E>

§

impl<E> ColIndex<RangeToInclusive<usize>> for ColMut<'_, E>
where E: Entity,

§

type Target = ColMut<'_, E>

§

impl<E> ColIndex<RangeToInclusive<usize>> for ColRef<'_, E>
where E: Entity,

§

type Target = ColRef<'_, E>