Trait datazoo::Index

source ·
pub trait Index {
    // Required methods
    fn get(&self) -> usize;
    fn new(v: usize) -> Self;
}
Expand description

A type that can be cast into an index.

Note that Index types are assumed to NOT have a significant drop.

Required Methods§

source

fn get(&self) -> usize

Get the index value of this type.

source

fn new(v: usize) -> Self

Get the type from the index value.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Index for u8

source§

fn get(&self) -> usize

source§

fn new(v: usize) -> Self

source§

impl Index for u16

source§

fn get(&self) -> usize

source§

fn new(v: usize) -> Self

source§

impl Index for u32

source§

fn get(&self) -> usize

source§

fn new(v: usize) -> Self

source§

impl Index for u64

source§

fn get(&self) -> usize

source§

fn new(v: usize) -> Self

source§

impl Index for usize

source§

fn get(&self) -> usize

source§

fn new(v: usize) -> Self

Implementors§