Trait Ranked

Source
pub trait Ranked: Sized {
    type Item: 'static;

    // Required methods
    fn region(&self) -> &Region;
    fn get(&self, rank: usize) -> Option<&Self::Item>;
}
Expand description

Ranked is a helper trait to implement View on a ranked collection of items.

Required Associated Types§

Source

type Item: 'static

The type of item in this view.

Required Methods§

Source

fn region(&self) -> &Region

The ranks contained in this view.

Source

fn get(&self, rank: usize) -> Option<&Self::Item>

Return the item at rank

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§