Trait faer_sparse::Index

source ·
pub trait Index: Seal + Debug + Not<Output = Self> + Add<Output = Self> + Sub<Output = Self> + AddAssign + SubAssign + Pod + Eq + Ord + Send + Sync {
    type FixedWidth: Index;
    type Signed: SignedIndex;

    // Provided methods
    fn truncate(value: usize) -> Self { ... }
    fn zx(self) -> usize { ... }
    fn canonicalize(slice: &[Self]) -> &[Self::FixedWidth] { ... }
    fn canonicalize_mut(slice: &mut [Self]) -> &mut [Self::FixedWidth] { ... }
    fn from_signed(value: Self::Signed) -> Self { ... }
    fn to_signed(self) -> Self::Signed { ... }
    fn sum_nonnegative(slice: &[Self]) -> Option<Self> { ... }
}
Expand description

Trait for unsigned integers that can be indexed with.

Always smaller than or equal to usize.

Required Associated Types§

Provided Methods§

source

fn truncate(value: usize) -> Self

source

fn zx(self) -> usize

zero extend

source

fn canonicalize(slice: &[Self]) -> &[Self::FixedWidth]

source

fn canonicalize_mut(slice: &mut [Self]) -> &mut [Self::FixedWidth]

source

fn from_signed(value: Self::Signed) -> Self

source

fn to_signed(self) -> Self::Signed

source

fn sum_nonnegative(slice: &[Self]) -> Option<Self>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Index for u32

source§

impl Index for usize

Implementors§