Trait faer_sparse::SignedIndex
source · pub trait SignedIndex: Seal + Debug + Neg<Output = Self> + Add<Output = Self> + Sub<Output = Self> + AddAssign + SubAssign + Pod + Eq + Ord + Send + Sync {
const MAX: Self;
// Required methods
fn truncate(value: usize) -> Self;
fn zx(self) -> usize;
fn sx(self) -> usize;
// Provided method
fn sum_nonnegative(slice: &[Self]) -> Option<Self> { ... }
}
Expand description
Trait for signed integers corresponding to the ones satisfying Index
.
Always smaller than or equal to isize
.
Required Associated Constants§
Required Methods§
Provided Methods§
sourcefn sum_nonnegative(slice: &[Self]) -> Option<Self>
fn sum_nonnegative(slice: &[Self]) -> Option<Self>
Sum nonnegative values while checking for overflow.
Object Safety§
This trait is not object safe.