pub struct TypeVec<D: TypeEnumDescriptor>(/* private fields */);
Expand description
Efficiently stores variants of types in the descriptor list, and allows for accessing them by type.
Implementations§
Trait Implementations§
source§impl<D: TypeEnumDescriptor> Extend<TypeEnum<D>> for TypeVec<D>
impl<D: TypeEnumDescriptor> Extend<TypeEnum<D>> for TypeVec<D>
source§fn extend<T: IntoIterator<Item = TypeEnum<D>>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = TypeEnum<D>>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
source§impl<D: TypeEnumDescriptor> FromIterator<TypeEnum<D>> for TypeVec<D>
impl<D: TypeEnumDescriptor> FromIterator<TypeEnum<D>> for TypeVec<D>
source§impl<D: Ord + TypeEnumDescriptor> Ord for TypeVec<D>where
D::VecBacking: Ord,
impl<D: Ord + TypeEnumDescriptor> Ord for TypeVec<D>where
D::VecBacking: Ord,
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<D: PartialEq + TypeEnumDescriptor> PartialEq for TypeVec<D>where
D::VecBacking: PartialEq,
impl<D: PartialEq + TypeEnumDescriptor> PartialEq for TypeVec<D>where
D::VecBacking: PartialEq,
source§impl<D: PartialOrd + TypeEnumDescriptor> PartialOrd for TypeVec<D>where
D::VecBacking: PartialOrd,
impl<D: PartialOrd + TypeEnumDescriptor> PartialOrd for TypeVec<D>where
D::VecBacking: PartialOrd,
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<D: Eq + TypeEnumDescriptor> Eq for TypeVec<D>where
D::VecBacking: Eq,
impl<D: TypeEnumDescriptor> StructuralPartialEq for TypeVec<D>
Auto Trait Implementations§
impl<D> RefUnwindSafe for TypeVec<D>where
<D as ListDescriptor>::VecBacking: RefUnwindSafe,
impl<D> Send for TypeVec<D>where
<D as ListDescriptor>::VecBacking: Send,
impl<D> Sync for TypeVec<D>where
<D as ListDescriptor>::VecBacking: Sync,
impl<D> Unpin for TypeVec<D>where
<D as ListDescriptor>::VecBacking: Unpin,
impl<D> UnwindSafe for TypeVec<D>where
<D as ListDescriptor>::VecBacking: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more