Enum IndexVec
pub enum IndexVec
A vector of indices.
Multiple internal representations are possible.
Implementations
impl IndexVec
fn len(&self) -> usizeReturns the number of indices
fn is_empty(&self) -> boolReturns
trueif the length is 0.fn index(&self, index: usize) -> usizeReturn the value at the given
index.(Note: we cannot implement
std::ops::Indexbecause of lifetime restrictions.)fn into_vec(self) -> Vec<usize>Return result as a
Vec<usize>. Conversion may or may not be trivial.fn iter(&self) -> IndexVecIter<'_>Iterate over the indices as a sequence of
usizevalues
Trait Implementations
impl Clone for IndexVec
fn clone(&self) -> Self
impl Debug for IndexVec
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl From<Vec<u32>> for IndexVec
fn from(v: Vec<u32>) -> Self
impl From<Vec<u64>> for IndexVec
fn from(v: Vec<u64>) -> Self
impl IntoIterator for IndexVec
type IntoIter = IndexVecIntoIter;type Item = usize;fn into_iter(self) -> IndexVecIntoIterConvert into an iterator over the indices as a sequence of
usizevalues
impl PartialEq for IndexVec
fn eq(&self, other: &IndexVec) -> bool
impl Serialize for IndexVec
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where __S: Serializer,
impl<'de> Deserialize<'de> for IndexVec
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where __D: Deserializer<'de>,