pub trait VecIndex:
Debug
+ Default
+ Copy
+ Clone
+ PartialEq
+ Eq
+ PartialOrd
+ Ord
+ From<usize>
+ Into<usize>
+ Add<usize, Output = Self>
+ Send
+ Sync
+ PrintableIndex
+ 'static {
const INITIAL_CAPACITY: usize = 0;
// Provided methods
fn to_usize(self) -> usize { ... }
fn decremented(self) -> Option<Self> { ... }
}Expand description
Trait for types that can be used as vector indices.
Provided Associated Constants§
Sourceconst INITIAL_CAPACITY: usize = 0
const INITIAL_CAPACITY: usize = 0
Initial element capacity for newly created fixed-width raw vectors.
Provided Methods§
Sourcefn decremented(self) -> Option<Self>
fn decremented(self) -> Option<Self>
Returns the previous index, or None if this is zero.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".