IndexCore

Trait IndexCore 

Source
pub trait IndexCore:
    Seal
    + Debug
    + Not<Output = Self>
    + BitAnd<Output = Self>
    + BitOr<Output = Self>
    + BitXor<Output = Self>
    + Add<Output = Self>
    + Sub<Output = Self>
    + AddAssign
    + SubAssign
    + Pod
    + Eq
    + Ord
    + Send
    + Sync
    + Ord {
    const MAX: Self;

    // Required methods
    fn truncate(value: usize) -> Self;
    fn zx(self) -> usize;
}

Required Associated Constants§

Source

const MAX: Self

Required Methods§

Source

fn truncate(value: usize) -> Self

Truncate value to type Self.

Source

fn zx(self) -> usize

Zero extend self.

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.

Implementations on Foreign Types§

Source§

impl IndexCore for u8

Source§

const MAX: Self = 255u8

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for u16

Source§

const MAX: Self = 65_535u16

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for u32

Source§

const MAX: Self = 4_294_967_295u32

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for u64

Source§

const MAX: Self = 18_446_744_073_709_551_615u64

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for u128

Source§

const MAX: Self = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for usize

Source§

const MAX: Self = 18_446_744_073_709_551_615usize

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Implementors§