pub struct UniqueTypes<'gcx>(/* private fields */);Implementations§
Methods from Deref<Target = UniqueContainer<Type<'gcx>>>§
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn get(&self, index: usize) -> Option<&T>
pub fn iter(&self) -> PairIter<'_, T>
pub fn values(&self) -> ValueIter<'_, T>
Sourcepub fn truncate(&mut self, len: usize)
pub fn truncate(&mut self, len: usize)
Shortens the container to the given length.
All indices beyond the length will be invalidated.
Sourcepub fn insert(&mut self, value: T) -> usize
pub fn insert(&mut self, value: T) -> usize
Inserts the given value in the container.
If the same value was found by PartialEq, then the old value is replaced with the given
new value.
pub fn next_index<Q>(&mut self, value: &Q) -> usize
pub fn replace<Q>(&mut self, old: &Q, new: T) -> bool
pub fn find<Q>(&self, value: &Q) -> Option<usize>
Trait Implementations§
Source§impl<'gcx> Deref for UniqueTypes<'gcx>
impl<'gcx> Deref for UniqueTypes<'gcx>
Source§impl DerefMut for UniqueTypes<'_>
impl DerefMut for UniqueTypes<'_>
Auto Trait Implementations§
impl<'gcx> Freeze for UniqueTypes<'gcx>
impl<'gcx> !RefUnwindSafe for UniqueTypes<'gcx>
impl<'gcx> Send for UniqueTypes<'gcx>
impl<'gcx> !Sync for UniqueTypes<'gcx>
impl<'gcx> Unpin for UniqueTypes<'gcx>
impl<'gcx> UnsafeUnpin for UniqueTypes<'gcx>
impl<'gcx> UnwindSafe for UniqueTypes<'gcx>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more