Struct VecGroup
pub struct VecGroup<E, T = <E as Entity>::Unit>where
E: Entity,{
inner: <<E as Entity>::Group as ForType>::FaerOf<Vec<T>>,
}
Expand description
Analogous to alloc::vec::Vec
for groups.
Fields§
§inner: <<E as Entity>::Group as ForType>::FaerOf<Vec<T>>
Implementations§
§impl<E, T> VecGroup<E, T>where
E: Entity,
impl<E, T> VecGroup<E, T>where
E: Entity,
pub fn from_inner(
inner: <<E as Entity>::Group as ForType>::FaerOf<Vec<T>>,
) -> VecGroup<E, T>
pub fn from_inner( inner: <<E as Entity>::Group as ForType>::FaerOf<Vec<T>>, ) -> VecGroup<E, T>
Create a new VecGroup
from a group of alloc::vec::Vec
.
pub fn into_inner(self) -> <<E as Entity>::Group as ForType>::FaerOf<Vec<T>>
pub fn into_inner(self) -> <<E as Entity>::Group as ForType>::FaerOf<Vec<T>>
Consume self
to return a group of alloc::vec::Vec
.
pub fn as_inner_ref(&self) -> <<E as Entity>::Group as ForType>::FaerOf<&Vec<T>>
pub fn as_inner_ref(&self) -> <<E as Entity>::Group as ForType>::FaerOf<&Vec<T>>
Return a reference to the inner group of alloc::vec::Vec
.
pub fn as_inner_mut(
&mut self,
) -> <<E as Entity>::Group as ForType>::FaerOf<&mut Vec<T>>
pub fn as_inner_mut( &mut self, ) -> <<E as Entity>::Group as ForType>::FaerOf<&mut Vec<T>>
Return a mutable reference to the inner group of alloc::vec::Vec
.
pub fn as_slice(&self) -> SliceGroup<'_, E, T>
pub fn as_slice(&self) -> SliceGroup<'_, E, T>
Return a SliceGroup
view over the elements of self
.
pub fn as_slice_mut(&mut self) -> SliceGroupMut<'_, E, T>
pub fn as_slice_mut(&mut self) -> SliceGroupMut<'_, E, T>
Return a SliceGroupMut
mutable view over the elements of self
.
pub fn reserve_exact(&mut self, additional: usize)
pub fn reserve_exact(&mut self, additional: usize)
Reserve exactly enough capacity for extra additional
elements.
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
Try to reserve enough capacity for extra additional
elements.
pub fn try_reserve_exact(
&mut self,
additional: usize,
) -> Result<(), TryReserveError>
pub fn try_reserve_exact( &mut self, additional: usize, ) -> Result<(), TryReserveError>
Try to reserve exactly enough capacity for extra additional
elements.
pub fn clear(&mut self)
pub fn clear(&mut self)
Clear the vector, making it empty.
pub fn resize(
&mut self,
new_len: usize,
value: <<E as Entity>::Group as ForType>::FaerOf<T>,
)where
T: Clone,
pub fn resize(
&mut self,
new_len: usize,
value: <<E as Entity>::Group as ForType>::FaerOf<T>,
)where
T: Clone,
Resize the vector to new_len
, filling the new elements with
value
.
pub fn resize_with(
&mut self,
new_len: usize,
f: impl FnMut() -> <<E as Entity>::Group as ForType>::FaerOf<T>,
)
pub fn resize_with( &mut self, new_len: usize, f: impl FnMut() -> <<E as Entity>::Group as ForType>::FaerOf<T>, )
Resize the vector to new_len
, filling the new elements with
the output of f
.
pub fn push(&mut self, value: <<E as Entity>::Group as ForType>::FaerOf<T>)
pub fn push(&mut self, value: <<E as Entity>::Group as ForType>::FaerOf<T>)
Push a new element to the end of self
.
Trait Implementations§
impl<E, T> Send for VecGroup<E, T>
impl<E, T> Sync for VecGroup<E, T>
Auto Trait Implementations§
impl<E, T> Freeze for VecGroup<E, T>
impl<E, T> RefUnwindSafe for VecGroup<E, T>
impl<E, T> Unpin for VecGroup<E, T>
impl<E, T> UnwindSafe for VecGroup<E, T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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> ⓘ
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> ⓘ
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