Skip to main content

PoolIndex

Trait PoolIndex 

Source
pub trait PoolIndex<T>: BorrowMut<[usize]> {
    type Item;

    // Required method
    fn extract_item<I: Iterator<Item = T>>(
        &self,
        pool: &LazyBuffer<I>,
    ) -> Self::Item
       where T: Clone;

    // Provided method
    fn len(&self) -> usize { ... }
}
Expand description

A type holding indices of elements in a pool or buffer of items from an inner iterator and used to pick out different combinations in a generic way.

Required Associated Types§

Required Methods§

Source

fn extract_item<I: Iterator<Item = T>>( &self, pool: &LazyBuffer<I>, ) -> Self::Item
where T: Clone,

Provided Methods§

Source

fn len(&self) -> usize

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<T, const K: usize> PoolIndex<T> for [usize; K]

Source§

type Item = [T; K]

Source§

fn extract_item<I: Iterator<Item = T>>(&self, pool: &LazyBuffer<I>) -> [T; K]
where T: Clone,

Source§

impl<T> PoolIndex<T> for Box<[usize]>

Source§

type Item = Vec<T>

Source§

fn extract_item<I: Iterator<Item = T>>(&self, pool: &LazyBuffer<I>) -> Vec<T>
where T: Clone,

Source§

impl<T> PoolIndex<T> for Vec<usize>

Source§

type Item = Vec<T>

Source§

fn extract_item<I: Iterator<Item = T>>(&self, pool: &LazyBuffer<I>) -> Vec<T>
where T: Clone,

Implementors§