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>,
Auto Trait Implementations
impl Freeze for IndexVec
impl RefUnwindSafe for IndexVec
impl Send for IndexVec
impl Sync for IndexVec
impl Unpin for IndexVec
impl UnsafeUnpin for IndexVec
impl UnwindSafe for IndexVec
Blanket Implementations
impl<T> Any for IndexVec
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for IndexVec
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for IndexVec
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for IndexVec
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> DeserializeOwned for IndexVec
where
T: for<'de> Deserialize<'de>,
impl<T> From<T> for IndexVec
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for IndexVec
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for IndexVec
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for IndexVec
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for IndexVec
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>