pub struct PerEntity<Idx: EntityRef, T: Clone + Debug + Default>(/* private fields */);
Expand description
Vector of state per entity in an index-space that does not define the index-space. In other words, this container will not pass out new indices, it will only allow associating state with existing indices; and it requires a default value for data at an index not yet assigned.
Trait Implementations§
Source§impl<Idx: Default + EntityRef, T: Default + Clone + Debug + Default> Default for PerEntity<Idx, T>
impl<Idx: Default + EntityRef, T: Default + Clone + Debug + Default> Default for PerEntity<Idx, T>
Source§impl<'de, Idx: EntityRef, T> Deserialize<'de> for PerEntity<Idx, T>
impl<'de, Idx: EntityRef, T> Deserialize<'de> for PerEntity<Idx, T>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<Idx: EntityRef, T: Clone + Debug + Default + PartialEq + Eq> Eq for PerEntity<Idx, T>
Auto Trait Implementations§
impl<Idx, T> Freeze for PerEntity<Idx, T>where
T: Freeze,
impl<Idx, T> RefUnwindSafe for PerEntity<Idx, T>where
T: RefUnwindSafe,
Idx: RefUnwindSafe,
impl<Idx, T> Send for PerEntity<Idx, T>
impl<Idx, T> Sync for PerEntity<Idx, T>
impl<Idx, T> Unpin for PerEntity<Idx, T>
impl<Idx, T> UnwindSafe for PerEntity<Idx, T>where
T: UnwindSafe,
Idx: 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
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)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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