Skip to main content

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 = Self::MAX

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for u16

Source§

const MAX: Self = Self::MAX

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for u32

Source§

const MAX: Self = Self::MAX

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for u64

Source§

const MAX: Self = Self::MAX

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for u128

Source§

const MAX: Self = Self::MAX

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Source§

impl IndexCore for usize

Source§

const MAX: Self = Self::MAX

Source§

fn truncate(value: usize) -> Self

Source§

fn zx(self) -> usize

Implementors§