pub struct EntityIndexMap<V>(/* private fields */);Expand description
A IndexMap pre-configured to use EntityHash hashing.
Implementations§
Source§impl<V> EntityIndexMap<V>
impl<V> EntityIndexMap<V>
Sourcepub const fn new() -> EntityIndexMap<V>
pub const fn new() -> EntityIndexMap<V>
Creates an empty EntityIndexMap.
Equivalent to IndexMap::with_hasher(EntityHash).
Sourcepub fn with_capacity(n: usize) -> EntityIndexMap<V>
pub fn with_capacity(n: usize) -> EntityIndexMap<V>
Creates an empty EntityIndexMap with the specified capacity.
Equivalent to IndexMap::with_capacity_and_hasher(n, EntityHash).
Sourcepub const fn from_index_map(
set: IndexMap<Entity, V, EntityHash>,
) -> EntityIndexMap<V>
pub const fn from_index_map( set: IndexMap<Entity, V, EntityHash>, ) -> EntityIndexMap<V>
Constructs an EntityIndexMap from an IndexMap.
Sourcepub fn into_inner(self) -> IndexMap<Entity, V, EntityHash>
pub fn into_inner(self) -> IndexMap<Entity, V, EntityHash>
Returns the inner IndexMap.
Sourcepub fn as_slice(&self) -> &Slice<V>
pub fn as_slice(&self) -> &Slice<V>
Returns a slice of all the key-value pairs in the map.
Equivalent to IndexMap::as_slice.
Sourcepub fn as_mut_slice(&mut self) -> &mut Slice<V>
pub fn as_mut_slice(&mut self) -> &mut Slice<V>
Returns a mutable slice of all the key-value pairs in the map.
Equivalent to IndexMap::as_mut_slice.
Sourcepub fn into_boxed_slice(self) -> Box<Slice<V>>
pub fn into_boxed_slice(self) -> Box<Slice<V>>
Converts into a boxed slice of all the key-value pairs in the map.
Equivalent to IndexMap::into_boxed_slice.
Sourcepub fn get_range<R>(&self, range: R) -> Option<&Slice<V>>where
R: RangeBounds<usize>,
pub fn get_range<R>(&self, range: R) -> Option<&Slice<V>>where
R: RangeBounds<usize>,
Returns a slice of key-value pairs in the given range of indices.
Equivalent to IndexMap::get_range.
Sourcepub fn get_range_mut<R>(&mut self, range: R) -> Option<&mut Slice<V>>where
R: RangeBounds<usize>,
pub fn get_range_mut<R>(&mut self, range: R) -> Option<&mut Slice<V>>where
R: RangeBounds<usize>,
Returns a mutable slice of key-value pairs in the given range of indices.
Equivalent to IndexMap::get_range_mut.
Sourcepub fn iter(&self) -> Iter<'_, V> ⓘ
pub fn iter(&self) -> Iter<'_, V> ⓘ
Return an iterator over the key-value pairs of the map, in their order.
Equivalent to IndexMap::iter.
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, V> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, V> ⓘ
Return a mutable iterator over the key-value pairs of the map, in their order.
Equivalent to IndexMap::iter_mut.
Sourcepub fn drain<R>(&mut self, range: R) -> Drain<'_, V> ⓘwhere
R: RangeBounds<usize>,
pub fn drain<R>(&mut self, range: R) -> Drain<'_, V> ⓘwhere
R: RangeBounds<usize>,
Clears the IndexMap in the given index range, returning those
key-value pairs as a drain iterator.
Equivalent to IndexMap::drain.
Sourcepub fn keys(&self) -> Keys<'_, V> ⓘ
pub fn keys(&self) -> Keys<'_, V> ⓘ
Return an iterator over the keys of the map, in their order.
Equivalent to IndexMap::keys.
Sourcepub fn into_keys(self) -> IntoKeys<V> ⓘ
pub fn into_keys(self) -> IntoKeys<V> ⓘ
Return an owning iterator over the keys of the map, in their order.
Equivalent to IndexMap::into_keys.
Methods from Deref<Target = IndexMap<Entity, V, EntityHash>>§
Sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Return the number of elements the map can hold without reallocating.
This number is a lower bound; the map might be able to hold more, but is guaranteed to be able to hold at least this many.
Computes in O(1) time.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Return the number of key-value pairs in the map.
Computes in O(1) time.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the map contains no elements.
Computes in O(1) time.
Sourcepub fn iter(&self) -> Iter<'_, K, V> ⓘ
pub fn iter(&self) -> Iter<'_, K, V> ⓘ
Return an iterator over the key-value pairs of the map, in their order
Sourcepub fn iter_mut(&mut self) -> IterMut<'_, K, V> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, K, V> ⓘ
Return an iterator over the key-value pairs of the map, in their order
Sourcepub fn keys(&self) -> Keys<'_, K, V> ⓘ
pub fn keys(&self) -> Keys<'_, K, V> ⓘ
Return an iterator over the keys of the map, in their order
Sourcepub fn values(&self) -> Values<'_, K, V> ⓘ
pub fn values(&self) -> Values<'_, K, V> ⓘ
Return an iterator over the values of the map, in their order
Examples found in repository?
304fn update_shape_aabb_colors(
305 view_query: Query<&VisibleEntities, With<MyCamera>>,
306 mut gizmo_query: Query<&mut ShowAabbGizmo, With<MyShape>>,
307) -> Result {
308 // Reset the color to use the config's default color
309 for mut shape_gizmo in &mut gizmo_query {
310 shape_gizmo.color = None;
311 }
312
313 // Query for the shape entities visible for this camera
314 // Update the gizmo on any such shape entity to be green
315 let visible_entities = view_query.single()?;
316 for entity in visible_entities.entities.values().flatten() {
317 if let Ok(mut shape_gizmo) = gizmo_query.get_mut(*entity) {
318 shape_gizmo.color = Some(Color::LinearRgba(LinearRgba::GREEN));
319 }
320 }
321 Ok(())
322}Sourcepub fn values_mut(&mut self) -> ValuesMut<'_, K, V> ⓘ
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V> ⓘ
Return an iterator over mutable references to the values of the map, in their order
Sourcepub fn clear(&mut self)
pub fn clear(&mut self)
Remove all key-value pairs in the map, while preserving its capacity.
Computes in O(n) time.
Sourcepub fn truncate(&mut self, len: usize)
pub fn truncate(&mut self, len: usize)
Shortens the map, keeping the first len elements and dropping the rest.
If len is greater than the map’s current length, this has no effect.
Sourcepub fn drain<R>(&mut self, range: R) -> Drain<'_, K, V> ⓘwhere
R: RangeBounds<usize>,
pub fn drain<R>(&mut self, range: R) -> Drain<'_, K, V> ⓘwhere
R: RangeBounds<usize>,
Clears the IndexMap in the given index range, returning those
key-value pairs as a drain iterator.
The range may be any type that implements RangeBounds<usize>,
including all of the std::ops::Range* types, or even a tuple pair of
Bound start and end values. To drain the map entirely, use RangeFull
like map.drain(..).
This shifts down all entries following the drained range to fill the gap, and keeps the allocated memory for reuse.
Panics if the starting point is greater than the end point or if the end point is greater than the length of the map.
Sourcepub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, F> ⓘ
pub fn extract_if<F, R>(&mut self, range: R, pred: F) -> ExtractIf<'_, K, V, F> ⓘ
Creates an iterator which uses a closure to determine if an element should be removed, for all elements in the given range.
If the closure returns true, the element is removed from the map and yielded. If the closure returns false, or panics, the element remains in the map and will not be yielded.
Note that extract_if lets you mutate every value in the filter closure, regardless of
whether you choose to keep or remove it.
The range may be any type that implements RangeBounds<usize>,
including all of the std::ops::Range* types, or even a tuple pair of
Bound start and end values. To check the entire map, use RangeFull
like map.extract_if(.., predicate).
If the returned ExtractIf is not exhausted, e.g. because it is dropped without iterating
or the iteration short-circuits, then the remaining elements will be retained.
Use retain with a negated predicate if you do not need the returned iterator.
Panics if the starting point is greater than the end point or if the end point is greater than the length of the map.
§Examples
Splitting a map into even and odd keys, reusing the original map:
use indexmap::IndexMap;
let mut map: IndexMap<i32, i32> = (0..8).map(|x| (x, x)).collect();
let extracted: IndexMap<i32, i32> = map.extract_if(.., |k, _v| k % 2 == 0).collect();
let evens = extracted.keys().copied().collect::<Vec<_>>();
let odds = map.keys().copied().collect::<Vec<_>>();
assert_eq!(evens, vec![0, 2, 4, 6]);
assert_eq!(odds, vec![1, 3, 5, 7]);Sourcepub fn split_off(&mut self, at: usize) -> IndexMap<K, V, S>where
S: Clone,
pub fn split_off(&mut self, at: usize) -> IndexMap<K, V, S>where
S: Clone,
Splits the collection into two at the given index.
Returns a newly allocated map containing the elements in the range
[at, len). After the call, the original map will be left containing
the elements [0, at) with its previous capacity unchanged.
Panics if at > len.
Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserve capacity for additional more key-value pairs.
Computes in O(n) time.
Sourcepub fn reserve_exact(&mut self, additional: usize)
pub fn reserve_exact(&mut self, additional: usize)
Reserve capacity for additional more key-value pairs, without over-allocating.
Unlike reserve, this does not deliberately over-allocate the entry capacity to avoid
frequent re-allocations. However, the underlying data structures may still have internal
capacity requirements, and the allocator itself may give more space than requested, so this
cannot be relied upon to be precisely minimal.
Computes in O(n) time.
Sourcepub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
Try to reserve capacity for additional more key-value pairs.
Computes in O(n) time.
Sourcepub fn try_reserve_exact(
&mut self,
additional: usize,
) -> Result<(), TryReserveError>
pub fn try_reserve_exact( &mut self, additional: usize, ) -> Result<(), TryReserveError>
Try to reserve capacity for additional more key-value pairs, without over-allocating.
Unlike try_reserve, this does not deliberately over-allocate the entry capacity to avoid
frequent re-allocations. However, the underlying data structures may still have internal
capacity requirements, and the allocator itself may give more space than requested, so this
cannot be relied upon to be precisely minimal.
Computes in O(n) time.
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrink the capacity of the map as much as possible.
Computes in O(n) time.
Sourcepub fn shrink_to(&mut self, min_capacity: usize)
pub fn shrink_to(&mut self, min_capacity: usize)
Shrink the capacity of the map with a lower limit.
Computes in O(n) time.
Sourcepub fn insert(&mut self, key: K, value: V) -> Option<V>
pub fn insert(&mut self, key: K, value: V) -> Option<V>
Insert a key-value pair in the map.
If an equivalent key already exists in the map: the key remains and
retains in its place in the order, its corresponding value is updated
with value, and the older value is returned inside Some(_).
If no equivalent key existed in the map: the new key-value pair is
inserted, last in order, and None is returned.
Computes in O(1) time (amortized average).
See also entry if you want to insert or modify,
or insert_full if you need to get the index of
the corresponding key-value pair.
Examples found in repository?
79fn init_image_material_resources(
80 mut commands: Commands,
81 render_device: Res<RenderDevice>,
82 mut bind_group_allocators: ResMut<MaterialBindGroupAllocators>,
83) {
84 let bind_group_layout = BindGroupLayoutDescriptor::new(
85 "image_material_layout",
86 &BindGroupLayoutEntries::sequential(
87 ShaderStages::FRAGMENT,
88 (
89 texture_2d(TextureSampleType::Float { filterable: false }),
90 sampler(SamplerBindingType::NonFiltering),
91 ),
92 ),
93 );
94 let sampler = render_device.create_sampler(&SamplerDescriptor::default());
95 commands.insert_resource(ImageMaterialBindGroupLayout(bind_group_layout.clone()));
96 commands.insert_resource(ImageMaterialBindGroupSampler(sampler));
97
98 bind_group_allocators.insert(
99 TypeId::of::<ImageMaterial>(),
100 MaterialBindGroupAllocator::new(
101 &render_device,
102 "image_material_allocator",
103 None,
104 bind_group_layout,
105 None,
106 ),
107 );
108}Sourcepub fn insert_full(&mut self, key: K, value: V) -> (usize, Option<V>)
pub fn insert_full(&mut self, key: K, value: V) -> (usize, Option<V>)
Insert a key-value pair in the map, and get their index.
If an equivalent key already exists in the map: the key remains and
retains in its place in the order, its corresponding value is updated
with value, and the older value is returned inside (index, Some(_)).
If no equivalent key existed in the map: the new key-value pair is
inserted, last in order, and (index, None) is returned.
Computes in O(1) time (amortized average).
See also entry if you want to insert or modify.
Sourcepub fn insert_sorted(&mut self, key: K, value: V) -> (usize, Option<V>)where
K: Ord,
pub fn insert_sorted(&mut self, key: K, value: V) -> (usize, Option<V>)where
K: Ord,
Insert a key-value pair in the map at its ordered position among sorted keys.
This is equivalent to finding the position with
binary_search_keys, then either updating
it or calling insert_before for a new key.
If the sorted key is found in the map, its corresponding value is
updated with value, and the older value is returned inside
(index, Some(_)). Otherwise, the new key-value pair is inserted at
the sorted position, and (index, None) is returned.
If the existing keys are not already sorted, then the insertion
index is unspecified (like slice::binary_search), but the key-value
pair is moved to or inserted at that position regardless.
Computes in O(n) time (average). Instead of repeating calls to
insert_sorted, it may be faster to call batched insert
or extend and only call sort_keys
or sort_unstable_keys once.
Sourcepub fn insert_sorted_by<F>(
&mut self,
key: K,
value: V,
cmp: F,
) -> (usize, Option<V>)
pub fn insert_sorted_by<F>( &mut self, key: K, value: V, cmp: F, ) -> (usize, Option<V>)
Insert a key-value pair in the map at its ordered position among keys
sorted by cmp.
This is equivalent to finding the position with
binary_search_by, then calling
insert_before with the given key and value.
If the existing keys are not already sorted, then the insertion
index is unspecified (like slice::binary_search), but the key-value
pair is moved to or inserted at that position regardless.
Computes in O(n) time (average).
Sourcepub fn insert_sorted_by_key<B, F>(
&mut self,
key: K,
value: V,
sort_key: F,
) -> (usize, Option<V>)
pub fn insert_sorted_by_key<B, F>( &mut self, key: K, value: V, sort_key: F, ) -> (usize, Option<V>)
Insert a key-value pair in the map at its ordered position using a sort-key extraction function.
This is equivalent to finding the position with
binary_search_by_key with sort_key(key), then
calling insert_before with the given key and value.
If the existing keys are not already sorted, then the insertion
index is unspecified (like slice::binary_search), but the key-value
pair is moved to or inserted at that position regardless.
Computes in O(n) time (average).
Sourcepub fn insert_before(
&mut self,
index: usize,
key: K,
value: V,
) -> (usize, Option<V>)
pub fn insert_before( &mut self, index: usize, key: K, value: V, ) -> (usize, Option<V>)
Insert a key-value pair in the map before the entry at the given index, or at the end.
If an equivalent key already exists in the map: the key remains and
is moved to the new position in the map, its corresponding value is updated
with value, and the older value is returned inside Some(_). The returned index
will either be the given index or one less, depending on how the entry moved.
(See shift_insert for different behavior here.)
If no equivalent key existed in the map: the new key-value pair is
inserted exactly at the given index, and None is returned.
Panics if index is out of bounds.
Valid indices are 0..=map.len() (inclusive).
Computes in O(n) time (average).
See also entry if you want to insert or modify,
perhaps only using the index for new entries with VacantEntry::shift_insert.
§Examples
use indexmap::IndexMap;
let mut map: IndexMap<char, ()> = ('a'..='z').map(|c| (c, ())).collect();
// The new key '*' goes exactly at the given index.
assert_eq!(map.get_index_of(&'*'), None);
assert_eq!(map.insert_before(10, '*', ()), (10, None));
assert_eq!(map.get_index_of(&'*'), Some(10));
// Moving the key 'a' up will shift others down, so this moves *before* 10 to index 9.
assert_eq!(map.insert_before(10, 'a', ()), (9, Some(())));
assert_eq!(map.get_index_of(&'a'), Some(9));
assert_eq!(map.get_index_of(&'*'), Some(10));
// Moving the key 'z' down will shift others up, so this moves to exactly 10.
assert_eq!(map.insert_before(10, 'z', ()), (10, Some(())));
assert_eq!(map.get_index_of(&'z'), Some(10));
assert_eq!(map.get_index_of(&'*'), Some(11));
// Moving or inserting before the endpoint is also valid.
assert_eq!(map.len(), 27);
assert_eq!(map.insert_before(map.len(), '*', ()), (26, Some(())));
assert_eq!(map.get_index_of(&'*'), Some(26));
assert_eq!(map.insert_before(map.len(), '+', ()), (27, None));
assert_eq!(map.get_index_of(&'+'), Some(27));
assert_eq!(map.len(), 28);Sourcepub fn shift_insert(&mut self, index: usize, key: K, value: V) -> Option<V>
pub fn shift_insert(&mut self, index: usize, key: K, value: V) -> Option<V>
Insert a key-value pair in the map at the given index.
If an equivalent key already exists in the map: the key remains and
is moved to the given index in the map, its corresponding value is updated
with value, and the older value is returned inside Some(_).
Note that existing entries cannot be moved to index == map.len()!
(See insert_before for different behavior here.)
If no equivalent key existed in the map: the new key-value pair is
inserted at the given index, and None is returned.
Panics if index is out of bounds.
Valid indices are 0..map.len() (exclusive) when moving an existing entry, or
0..=map.len() (inclusive) when inserting a new key.
Computes in O(n) time (average).
See also entry if you want to insert or modify,
perhaps only using the index for new entries with VacantEntry::shift_insert.
§Examples
use indexmap::IndexMap;
let mut map: IndexMap<char, ()> = ('a'..='z').map(|c| (c, ())).collect();
// The new key '*' goes exactly at the given index.
assert_eq!(map.get_index_of(&'*'), None);
assert_eq!(map.shift_insert(10, '*', ()), None);
assert_eq!(map.get_index_of(&'*'), Some(10));
// Moving the key 'a' up to 10 will shift others down, including the '*' that was at 10.
assert_eq!(map.shift_insert(10, 'a', ()), Some(()));
assert_eq!(map.get_index_of(&'a'), Some(10));
assert_eq!(map.get_index_of(&'*'), Some(9));
// Moving the key 'z' down to 9 will shift others up, including the '*' that was at 9.
assert_eq!(map.shift_insert(9, 'z', ()), Some(()));
assert_eq!(map.get_index_of(&'z'), Some(9));
assert_eq!(map.get_index_of(&'*'), Some(10));
// Existing keys can move to len-1 at most, but new keys can insert at the endpoint.
assert_eq!(map.len(), 27);
assert_eq!(map.shift_insert(map.len() - 1, '*', ()), Some(()));
assert_eq!(map.get_index_of(&'*'), Some(26));
assert_eq!(map.shift_insert(map.len(), '+', ()), None);
assert_eq!(map.get_index_of(&'+'), Some(27));
assert_eq!(map.len(), 28);use indexmap::IndexMap;
let mut map: IndexMap<char, ()> = ('a'..='z').map(|c| (c, ())).collect();
// This is an invalid index for moving an existing key!
map.shift_insert(map.len(), 'a', ());Sourcepub fn replace_index(&mut self, index: usize, key: K) -> Result<K, (usize, K)>
pub fn replace_index(&mut self, index: usize, key: K) -> Result<K, (usize, K)>
Replaces the key at the given index. The new key does not need to be equivalent to the one it is replacing, but it must be unique to the rest of the map.
Returns Ok(old_key) if successful, or Err((other_index, key)) if an
equivalent key already exists at a different index. The map will be
unchanged in the error case.
Direct indexing can be used to change the corresponding value: simply
map[index] = value, or mem::replace(&mut map[index], value) to
retrieve the old value as well.
Panics if index is out of bounds.
Computes in O(1) time (average).
Sourcepub fn entry(&mut self, key: K) -> Entry<'_, K, V>
pub fn entry(&mut self, key: K) -> Entry<'_, K, V>
Get the given key’s corresponding entry in the map for insertion and/or in-place manipulation.
Computes in O(1) time (amortized average).
Sourcepub fn splice<R, I>(
&mut self,
range: R,
replace_with: I,
) -> Splice<'_, <I as IntoIterator>::IntoIter, K, V, S> ⓘ
pub fn splice<R, I>( &mut self, range: R, replace_with: I, ) -> Splice<'_, <I as IntoIterator>::IntoIter, K, V, S> ⓘ
Creates a splicing iterator that replaces the specified range in the map
with the given replace_with key-value iterator and yields the removed
items. replace_with does not need to be the same length as range.
The range is removed even if the iterator is not consumed until the
end. It is unspecified how many elements are removed from the map if the
Splice value is leaked.
The input iterator replace_with is only consumed when the Splice
value is dropped. If a key from the iterator matches an existing entry
in the map (outside of range), then the value will be updated in that
position. Otherwise, the new key-value pair will be inserted in the
replaced range.
Panics if the starting point is greater than the end point or if the end point is greater than the length of the map.
§Examples
use indexmap::IndexMap;
let mut map = IndexMap::from([(0, '_'), (1, 'a'), (2, 'b'), (3, 'c'), (4, 'd')]);
let new = [(5, 'E'), (4, 'D'), (3, 'C'), (2, 'B'), (1, 'A')];
let removed: Vec<_> = map.splice(2..4, new).collect();
// 1 and 4 got new values, while 5, 3, and 2 were newly inserted.
assert!(map.into_iter().eq([(0, '_'), (1, 'A'), (5, 'E'), (3, 'C'), (2, 'B'), (4, 'D')]));
assert_eq!(removed, &[(2, 'b'), (3, 'c')]);Sourcepub fn append<S2>(&mut self, other: &mut IndexMap<K, V, S2>)
pub fn append<S2>(&mut self, other: &mut IndexMap<K, V, S2>)
Moves all key-value pairs from other into self, leaving other empty.
This is equivalent to calling insert for each
key-value pair from other in order, which means that for keys that
already exist in self, their value is updated in the current position.
§Examples
use indexmap::IndexMap;
// Note: Key (3) is present in both maps.
let mut a = IndexMap::from([(3, "c"), (2, "b"), (1, "a")]);
let mut b = IndexMap::from([(3, "d"), (4, "e"), (5, "f")]);
let old_capacity = b.capacity();
a.append(&mut b);
assert_eq!(a.len(), 5);
assert_eq!(b.len(), 0);
assert_eq!(b.capacity(), old_capacity);
assert!(a.keys().eq(&[3, 2, 1, 4, 5]));
assert_eq!(a[&3], "d"); // "c" was overwritten.Sourcepub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn contains_key<Q>(&self, key: &Q) -> bool
Return true if an equivalent to key exists in the map.
Computes in O(1) time (average).
Sourcepub fn get<Q>(&self, key: &Q) -> Option<&V>
pub fn get<Q>(&self, key: &Q) -> Option<&V>
Return a reference to the stored value for key, if it is present,
else None.
Computes in O(1) time (average).
Examples found in repository?
388fn readback_indirect_parameters_node(
389 mut render_context: RenderContext,
390 indirect_parameters_buffers: Res<IndirectParametersBuffers>,
391 indirect_parameters_mapping_buffers: Res<IndirectParametersStagingBuffers>,
392) {
393 // Get the indirect parameters buffers corresponding to the opaque 3D
394 // phase, since all our meshes are in that phase.
395 let Some(phase_indirect_parameters_buffers) =
396 indirect_parameters_buffers.get(&TypeId::of::<Opaque3d>())
397 else {
398 return;
399 };
400
401 // Grab both the buffers we're copying from and the staging buffers
402 // we're copying to. Remember that we can't map the indirect parameters
403 // buffers directly, so we have to copy their contents to a staging
404 // buffer.
405 let (
406 Some(indexed_data_buffer),
407 Some(indexed_batch_sets_buffer),
408 Some(indirect_parameters_staging_data_buffer),
409 Some(indirect_parameters_staging_batch_sets_buffer),
410 ) = (
411 phase_indirect_parameters_buffers.indexed.data_buffer(),
412 phase_indirect_parameters_buffers
413 .indexed
414 .batch_sets_buffer(),
415 indirect_parameters_mapping_buffers.data.as_ref(),
416 indirect_parameters_mapping_buffers.batch_sets.as_ref(),
417 )
418 else {
419 return;
420 };
421
422 // Copy from the indirect parameters buffers to the staging buffers.
423 render_context.command_encoder().copy_buffer_to_buffer(
424 indexed_data_buffer,
425 0,
426 indirect_parameters_staging_data_buffer,
427 0,
428 indexed_data_buffer.size(),
429 );
430 render_context.command_encoder().copy_buffer_to_buffer(
431 indexed_batch_sets_buffer,
432 0,
433 indirect_parameters_staging_batch_sets_buffer,
434 0,
435 indexed_batch_sets_buffer.size(),
436 );
437}
438
439/// Creates the staging buffers that we use to read back the indirect parameters
440/// from the GPU to the CPU.
441///
442/// We read the indirect parameters from the GPU to the CPU in order to display
443/// the number of meshes that were culled each frame.
444///
445/// We need these staging buffers because `wgpu` doesn't allow us to read the
446/// contents of the indirect parameters buffers directly. We must first copy
447/// them from the GPU to a staging buffer, and then read the staging buffer.
448fn create_indirect_parameters_staging_buffers(
449 mut indirect_parameters_staging_buffers: ResMut<IndirectParametersStagingBuffers>,
450 indirect_parameters_buffers: Res<IndirectParametersBuffers>,
451 render_device: Res<RenderDevice>,
452) {
453 let Some(phase_indirect_parameters_buffers) =
454 indirect_parameters_buffers.get(&TypeId::of::<Opaque3d>())
455 else {
456 return;
457 };
458
459 // Fetch the indirect parameters buffers that we're going to copy from.
460 let (Some(indexed_data_buffer), Some(indexed_batch_set_buffer)) = (
461 phase_indirect_parameters_buffers.indexed.data_buffer(),
462 phase_indirect_parameters_buffers
463 .indexed
464 .batch_sets_buffer(),
465 ) else {
466 return;
467 };
468
469 // Build the staging buffers. Make sure they have the same sizes as the
470 // buffers we're copying from.
471 indirect_parameters_staging_buffers.data =
472 Some(render_device.create_buffer(&BufferDescriptor {
473 label: Some("indexed data staging buffer"),
474 size: indexed_data_buffer.size(),
475 usage: BufferUsages::MAP_READ | BufferUsages::COPY_DST,
476 mapped_at_creation: false,
477 }));
478 indirect_parameters_staging_buffers.batch_sets =
479 Some(render_device.create_buffer(&BufferDescriptor {
480 label: Some("indexed batch set staging buffer"),
481 size: indexed_batch_set_buffer.size(),
482 usage: BufferUsages::MAP_READ | BufferUsages::COPY_DST,
483 mapped_at_creation: false,
484 }));
485}Sourcepub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)>
pub fn get_key_value<Q>(&self, key: &Q) -> Option<(&K, &V)>
Return references to the stored key-value pair for the lookup key,
if it is present, else None.
Computes in O(1) time (average).
Sourcepub fn get_full<Q>(&self, key: &Q) -> Option<(usize, &K, &V)>
pub fn get_full<Q>(&self, key: &Q) -> Option<(usize, &K, &V)>
Return the index with references to the stored key-value pair for the
lookup key, if it is present, else None.
Computes in O(1) time (average).
Sourcepub fn get_index_of<Q>(&self, key: &Q) -> Option<usize>
pub fn get_index_of<Q>(&self, key: &Q) -> Option<usize>
Return the item index for key, if it is present, else None.
Computes in O(1) time (average).
Sourcepub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
pub fn get_mut<Q>(&mut self, key: &Q) -> Option<&mut V>
Return a mutable reference to the stored value for key,
if it is present, else None.
Computes in O(1) time (average).
Examples found in repository?
145 fn prepare_asset(
146 source_asset: Self::SourceAsset,
147 asset_id: AssetId<Self::SourceAsset>,
148 (
149 opaque_draw_functions,
150 material_layout,
151 asset_server,
152 bind_group_allocators,
153 render_material_bindings,
154 gpu_images,
155 image_material_sampler,
156 ): &mut SystemParamItem<Self::Param>,
157 ) -> std::result::Result<Self::ErasedAsset, PrepareAssetError<Self::SourceAsset>> {
158 let material_layout = material_layout.0.clone();
159 let draw_function_id = opaque_draw_functions.read().id::<DrawMaterial>();
160 let bind_group_allocator = bind_group_allocators
161 .get_mut(&TypeId::of::<ImageMaterial>())
162 .unwrap();
163 let Some(image) = gpu_images.get(&source_asset.image) else {
164 return Err(PrepareAssetError::RetryNextUpdate(source_asset));
165 };
166 let unprepared = UnpreparedBindGroup {
167 bindings: BindingResources(vec![
168 (
169 0,
170 OwnedBindingResource::TextureView(
171 TextureViewDimension::D2,
172 image.texture_view.clone(),
173 ),
174 ),
175 (
176 1,
177 OwnedBindingResource::Sampler(
178 SamplerBindingType::NonFiltering,
179 image_material_sampler.0.clone(),
180 ),
181 ),
182 ]),
183 };
184 let binding = match render_material_bindings.entry(asset_id.into()) {
185 Entry::Occupied(mut occupied_entry) => {
186 bind_group_allocator.free(*occupied_entry.get());
187 let new_binding =
188 bind_group_allocator.allocate_unprepared(unprepared, &material_layout);
189 *occupied_entry.get_mut() = new_binding;
190 new_binding
191 }
192 Entry::Vacant(vacant_entry) => *vacant_entry
193 .insert(bind_group_allocator.allocate_unprepared(unprepared, &material_layout)),
194 };
195
196 let mut properties = MaterialProperties {
197 material_layout: Some(material_layout),
198 mesh_pipeline_key_bits: ErasedMeshPipelineKey::new(MeshPipelineKey::empty()),
199 base_specialize: Some(base_specialize),
200 ..Default::default()
201 };
202 properties.add_draw_function(MainPassOpaqueDrawFunction, draw_function_id);
203 properties.add_shader(MaterialFragmentShader, asset_server.load(SHADER_ASSET_PATH));
204
205 Ok(PreparedMaterial {
206 binding,
207 properties: Arc::new(properties),
208 })
209 }Sourcepub fn get_key_value_mut<Q>(&mut self, key: &Q) -> Option<(&K, &mut V)>
pub fn get_key_value_mut<Q>(&mut self, key: &Q) -> Option<(&K, &mut V)>
Return a reference and mutable references to the stored key-value pair
for the lookup key, if it is present, else None.
Computes in O(1) time (average).
Sourcepub fn get_full_mut<Q>(&mut self, key: &Q) -> Option<(usize, &K, &mut V)>
pub fn get_full_mut<Q>(&mut self, key: &Q) -> Option<(usize, &K, &mut V)>
Return the index with a reference and mutable reference to the stored
key-value pair for the lookup key, if it is present, else None.
Computes in O(1) time (average).
Sourcepub fn get_disjoint_mut<Q, const N: usize>(
&mut self,
keys: [&Q; N],
) -> [Option<&mut V>; N]
pub fn get_disjoint_mut<Q, const N: usize>( &mut self, keys: [&Q; N], ) -> [Option<&mut V>; N]
Return the values for N keys.
Panics if any key is duplicated.
§Examples
let mut map = indexmap::IndexMap::from([(1, 'a'), (3, 'b'), (2, 'c')]);
assert_eq!(map.get_disjoint_mut([&2, &1]), [Some(&mut 'c'), Some(&mut 'a')]);Sourcepub fn remove<Q>(&mut self, key: &Q) -> Option<V>
👎Deprecated: remove disrupts the map order – use swap_remove or shift_remove for explicit behavior.
pub fn remove<Q>(&mut self, key: &Q) -> Option<V>
remove disrupts the map order – use swap_remove or shift_remove for explicit behavior.
Remove the key-value pair equivalent to key and return
its value.
NOTE: This is equivalent to .swap_remove(key), replacing this
entry’s position with the last element, and it is deprecated in favor of calling that
explicitly. If you need to preserve the relative order of the keys in the map, use
.shift_remove(key) instead.
Sourcepub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
👎Deprecated: remove_entry disrupts the map order – use swap_remove_entry or shift_remove_entry for explicit behavior.
pub fn remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
remove_entry disrupts the map order – use swap_remove_entry or shift_remove_entry for explicit behavior.
Remove and return the key-value pair equivalent to key.
NOTE: This is equivalent to .swap_remove_entry(key),
replacing this entry’s position with the last element, and it is deprecated in favor of
calling that explicitly. If you need to preserve the relative order of the keys in the map,
use .shift_remove_entry(key) instead.
Sourcepub fn swap_remove<Q>(&mut self, key: &Q) -> Option<V>
pub fn swap_remove<Q>(&mut self, key: &Q) -> Option<V>
Remove the key-value pair equivalent to key and return
its value.
Like Vec::swap_remove, the pair is removed by swapping it with the
last element of the map and popping it off. This perturbs
the position of what used to be the last element!
Return None if key is not in map.
Computes in O(1) time (average).
Sourcepub fn swap_remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
pub fn swap_remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
Remove and return the key-value pair equivalent to key.
Like Vec::swap_remove, the pair is removed by swapping it with the
last element of the map and popping it off. This perturbs
the position of what used to be the last element!
Return None if key is not in map.
Computes in O(1) time (average).
Sourcepub fn swap_remove_full<Q>(&mut self, key: &Q) -> Option<(usize, K, V)>
pub fn swap_remove_full<Q>(&mut self, key: &Q) -> Option<(usize, K, V)>
Remove the key-value pair equivalent to key and return it and
the index it had.
Like Vec::swap_remove, the pair is removed by swapping it with the
last element of the map and popping it off. This perturbs
the position of what used to be the last element!
Return None if key is not in map.
Computes in O(1) time (average).
Sourcepub fn shift_remove<Q>(&mut self, key: &Q) -> Option<V>
pub fn shift_remove<Q>(&mut self, key: &Q) -> Option<V>
Remove the key-value pair equivalent to key and return
its value.
Like Vec::remove, the pair is removed by shifting all of the
elements that follow it, preserving their relative order.
This perturbs the index of all of those elements!
Return None if key is not in map.
Computes in O(n) time (average).
Sourcepub fn shift_remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
pub fn shift_remove_entry<Q>(&mut self, key: &Q) -> Option<(K, V)>
Remove and return the key-value pair equivalent to key.
Like Vec::remove, the pair is removed by shifting all of the
elements that follow it, preserving their relative order.
This perturbs the index of all of those elements!
Return None if key is not in map.
Computes in O(n) time (average).
Sourcepub fn shift_remove_full<Q>(&mut self, key: &Q) -> Option<(usize, K, V)>
pub fn shift_remove_full<Q>(&mut self, key: &Q) -> Option<(usize, K, V)>
Remove the key-value pair equivalent to key and return it and
the index it had.
Like Vec::remove, the pair is removed by shifting all of the
elements that follow it, preserving their relative order.
This perturbs the index of all of those elements!
Return None if key is not in map.
Computes in O(n) time (average).
Sourcepub fn pop(&mut self) -> Option<(K, V)>
pub fn pop(&mut self) -> Option<(K, V)>
Remove the last key-value pair
This preserves the order of the remaining elements.
Computes in O(1) time (average).
Sourcepub fn pop_if(
&mut self,
predicate: impl FnOnce(&K, &mut V) -> bool,
) -> Option<(K, V)>
pub fn pop_if( &mut self, predicate: impl FnOnce(&K, &mut V) -> bool, ) -> Option<(K, V)>
Removes and returns the last key-value pair from a map if the predicate
returns true, or None if the predicate returns false or the map
is empty (the predicate will not be called in that case).
This preserves the order of the remaining elements.
Computes in O(1) time (average).
§Examples
use indexmap::IndexMap;
let init = [(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd')];
let mut map = IndexMap::from(init);
let pred = |key: &i32, _value: &mut char| *key % 2 == 0;
assert_eq!(map.pop_if(pred), Some((4, 'd')));
assert_eq!(map.as_slice(), &init[..3]);
assert_eq!(map.pop_if(pred), None);Sourcepub fn retain<F>(&mut self, keep: F)
pub fn retain<F>(&mut self, keep: F)
Scan through each key-value pair in the map and keep those where the
closure keep returns true.
The elements are visited in order, and remaining elements keep their order.
Computes in O(n) time (average).
Sourcepub fn sort_keys(&mut self)where
K: Ord,
pub fn sort_keys(&mut self)where
K: Ord,
Sort the map’s key-value pairs by the default ordering of the keys.
This is a stable sort – but equivalent keys should not normally coexist in
a map at all, so sort_unstable_keys is preferred
because it is generally faster and doesn’t allocate auxiliary memory.
See sort_by for details.
Sourcepub fn sort_by<F>(&mut self, cmp: F)
pub fn sort_by<F>(&mut self, cmp: F)
Sort the map’s key-value pairs in place using the comparison
function cmp.
The comparison function receives two key and value pairs to compare (you can sort by keys or values or their combination as needed).
Computes in O(n log n + c) time and O(n) space where n is the length of the map and c the capacity. The sort is stable.
Sourcepub fn sort_by_key<T, F>(&mut self, sort_key: F)
pub fn sort_by_key<T, F>(&mut self, sort_key: F)
Sort the map’s key-value pairs in place using a sort-key extraction function.
Computes in O(n log n + c) time and O(n) space where n is the length of the map and c the capacity. The sort is stable.
Sourcepub fn sort_unstable_keys(&mut self)where
K: Ord,
pub fn sort_unstable_keys(&mut self)where
K: Ord,
Sort the map’s key-value pairs by the default ordering of the keys, but may not preserve the order of equal elements.
See sort_unstable_by for details.
Sourcepub fn sort_unstable_by<F>(&mut self, cmp: F)
pub fn sort_unstable_by<F>(&mut self, cmp: F)
Sort the map’s key-value pairs in place using the comparison function cmp, but
may not preserve the order of equal elements.
The comparison function receives two key and value pairs to compare (you can sort by keys or values or their combination as needed).
Computes in O(n log n + c) time where n is the length of the map and c is the capacity. The sort is unstable.
Sourcepub fn sort_unstable_by_key<T, F>(&mut self, sort_key: F)
pub fn sort_unstable_by_key<T, F>(&mut self, sort_key: F)
Sort the map’s key-value pairs in place using a sort-key extraction function.
Computes in O(n log n + c) time where n is the length of the map and c is the capacity. The sort is unstable.
Sourcepub fn sort_by_cached_key<T, F>(&mut self, sort_key: F)
pub fn sort_by_cached_key<T, F>(&mut self, sort_key: F)
Sort the map’s key-value pairs in place using a sort-key extraction function.
During sorting, the function is called at most once per entry, by using temporary storage
to remember the results of its evaluation. The order of calls to the function is
unspecified and may change between versions of indexmap or the standard library.
Computes in O(m n + n log n + c) time () and O(n) space, where the function is O(m), n is the length of the map, and c the capacity. The sort is stable.
Sourcepub fn binary_search_keys(&self, x: &K) -> Result<usize, usize>where
K: Ord,
pub fn binary_search_keys(&self, x: &K) -> Result<usize, usize>where
K: Ord,
Search over a sorted map for a key.
Returns the position where that key is present, or the position where it can be inserted to
maintain the sort. See slice::binary_search for more details.
Computes in O(log(n)) time, which is notably less scalable than looking the key up
using get_index_of, but this can also position missing keys.
Sourcepub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
pub fn binary_search_by<'a, F>(&'a self, f: F) -> Result<usize, usize>
Search over a sorted map with a comparator function.
Returns the position where that value is present, or the position where it can be inserted
to maintain the sort. See slice::binary_search_by for more details.
Computes in O(log(n)) time.
Sourcepub fn binary_search_by_key<'a, B, F>(
&'a self,
b: &B,
f: F,
) -> Result<usize, usize>
pub fn binary_search_by_key<'a, B, F>( &'a self, b: &B, f: F, ) -> Result<usize, usize>
Search over a sorted map with an extraction function.
Returns the position where that value is present, or the position where it can be inserted
to maintain the sort. See slice::binary_search_by_key for more details.
Computes in O(log(n)) time.
Sourcepub fn is_sorted(&self) -> boolwhere
K: PartialOrd,
pub fn is_sorted(&self) -> boolwhere
K: PartialOrd,
Checks if the keys of this map are sorted.
Sourcepub fn is_sorted_by<'a, F>(&'a self, cmp: F) -> bool
pub fn is_sorted_by<'a, F>(&'a self, cmp: F) -> bool
Checks if this map is sorted using the given comparator function.
Sourcepub fn is_sorted_by_key<'a, F, T>(&'a self, sort_key: F) -> bool
pub fn is_sorted_by_key<'a, F, T>(&'a self, sort_key: F) -> bool
Checks if this map is sorted using the given sort-key function.
Sourcepub fn partition_point<P>(&self, pred: P) -> usize
pub fn partition_point<P>(&self, pred: P) -> usize
Returns the index of the partition point of a sorted map according to the given predicate (the index of the first element of the second partition).
See slice::partition_point for more details.
Computes in O(log(n)) time.
Sourcepub fn reverse(&mut self)
pub fn reverse(&mut self)
Reverses the order of the map’s key-value pairs in place.
Computes in O(n) time and O(1) space.
Sourcepub fn as_slice(&self) -> &Slice<K, V>
pub fn as_slice(&self) -> &Slice<K, V>
Returns a slice of all the key-value pairs in the map.
Computes in O(1) time.
Sourcepub fn as_mut_slice(&mut self) -> &mut Slice<K, V>
pub fn as_mut_slice(&mut self) -> &mut Slice<K, V>
Returns a mutable slice of all the key-value pairs in the map.
Computes in O(1) time.
Sourcepub fn get_index(&self, index: usize) -> Option<(&K, &V)>
pub fn get_index(&self, index: usize) -> Option<(&K, &V)>
Get a key-value pair by index
Valid indices are 0 <= index < self.len().
Computes in O(1) time.
Sourcepub fn get_index_mut(&mut self, index: usize) -> Option<(&K, &mut V)>
pub fn get_index_mut(&mut self, index: usize) -> Option<(&K, &mut V)>
Get a key-value pair by index
Valid indices are 0 <= index < self.len().
Computes in O(1) time.
Sourcepub fn get_index_entry(
&mut self,
index: usize,
) -> Option<IndexedEntry<'_, K, V>>
pub fn get_index_entry( &mut self, index: usize, ) -> Option<IndexedEntry<'_, K, V>>
Get an entry in the map by index for in-place manipulation.
Valid indices are 0 <= index < self.len().
Computes in O(1) time.
Sourcepub fn get_disjoint_indices_mut<const N: usize>(
&mut self,
indices: [usize; N],
) -> Result<[(&K, &mut V); N], GetDisjointMutError>
pub fn get_disjoint_indices_mut<const N: usize>( &mut self, indices: [usize; N], ) -> Result<[(&K, &mut V); N], GetDisjointMutError>
Get an array of N key-value pairs by N indices
Valid indices are 0 <= index < self.len() and each index needs to be unique.
§Examples
let mut map = indexmap::IndexMap::from([(1, 'a'), (3, 'b'), (2, 'c')]);
assert_eq!(map.get_disjoint_indices_mut([2, 0]), Ok([(&2, &mut 'c'), (&1, &mut 'a')]));Sourcepub fn get_range<R>(&self, range: R) -> Option<&Slice<K, V>>where
R: RangeBounds<usize>,
pub fn get_range<R>(&self, range: R) -> Option<&Slice<K, V>>where
R: RangeBounds<usize>,
Returns a slice of key-value pairs in the given range of indices.
Valid indices are 0 <= index < self.len().
Computes in O(1) time.
Sourcepub fn get_range_mut<R>(&mut self, range: R) -> Option<&mut Slice<K, V>>where
R: RangeBounds<usize>,
pub fn get_range_mut<R>(&mut self, range: R) -> Option<&mut Slice<K, V>>where
R: RangeBounds<usize>,
Returns a mutable slice of key-value pairs in the given range of indices.
Valid indices are 0 <= index < self.len().
Computes in O(1) time.
Sourcepub fn first_mut(&mut self) -> Option<(&K, &mut V)>
pub fn first_mut(&mut self) -> Option<(&K, &mut V)>
Get the first key-value pair, with mutable access to the value
Computes in O(1) time.
Sourcepub fn first_entry(&mut self) -> Option<IndexedEntry<'_, K, V>>
pub fn first_entry(&mut self) -> Option<IndexedEntry<'_, K, V>>
Get the first entry in the map for in-place manipulation.
Computes in O(1) time.
Sourcepub fn last_mut(&mut self) -> Option<(&K, &mut V)>
pub fn last_mut(&mut self) -> Option<(&K, &mut V)>
Get the last key-value pair, with mutable access to the value
Computes in O(1) time.
Sourcepub fn last_entry(&mut self) -> Option<IndexedEntry<'_, K, V>>
pub fn last_entry(&mut self) -> Option<IndexedEntry<'_, K, V>>
Get the last entry in the map for in-place manipulation.
Computes in O(1) time.
Sourcepub fn swap_remove_index(&mut self, index: usize) -> Option<(K, V)>
pub fn swap_remove_index(&mut self, index: usize) -> Option<(K, V)>
Remove the key-value pair by index
Valid indices are 0 <= index < self.len().
Like Vec::swap_remove, the pair is removed by swapping it with the
last element of the map and popping it off. This perturbs
the position of what used to be the last element!
Computes in O(1) time (average).
Sourcepub fn shift_remove_index(&mut self, index: usize) -> Option<(K, V)>
pub fn shift_remove_index(&mut self, index: usize) -> Option<(K, V)>
Remove the key-value pair by index
Valid indices are 0 <= index < self.len().
Like Vec::remove, the pair is removed by shifting all of the
elements that follow it, preserving their relative order.
This perturbs the index of all of those elements!
Computes in O(n) time (average).
Sourcepub fn move_index(&mut self, from: usize, to: usize)
pub fn move_index(&mut self, from: usize, to: usize)
Moves the position of a key-value pair from one index to another by shifting all other pairs in-between.
- If
from < to, the other pairs will shift down while the targeted pair moves up. - If
from > to, the other pairs will shift up while the targeted pair moves down.
Panics if from or to are out of bounds.
Computes in O(n) time (average).
Sourcepub fn swap_indices(&mut self, a: usize, b: usize)
pub fn swap_indices(&mut self, a: usize, b: usize)
Swaps the position of two key-value pairs in the map.
Panics if a or b are out of bounds.
Computes in O(1) time (average).
Trait Implementations§
Source§impl<V> Clone for EntityIndexMap<V>where
V: Clone,
impl<V> Clone for EntityIndexMap<V>where
V: Clone,
Source§fn clone(&self) -> EntityIndexMap<V>
fn clone(&self) -> EntityIndexMap<V>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<V> Debug for EntityIndexMap<V>where
V: Debug,
impl<V> Debug for EntityIndexMap<V>where
V: Debug,
Source§impl<V> Default for EntityIndexMap<V>
impl<V> Default for EntityIndexMap<V>
Source§fn default() -> EntityIndexMap<V>
fn default() -> EntityIndexMap<V>
Source§impl<V> Deref for EntityIndexMap<V>
impl<V> Deref for EntityIndexMap<V>
Source§impl<V> DerefMut for EntityIndexMap<V>
impl<V> DerefMut for EntityIndexMap<V>
Source§impl<'de, V> Deserialize<'de> for EntityIndexMap<V>where
V: Deserialize<'de>,
impl<'de, V> Deserialize<'de> for EntityIndexMap<V>where
V: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntityIndexMap<V>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<EntityIndexMap<V>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl<V> Eq for EntityIndexMap<V>where
V: Eq,
Source§impl<'a, V> Extend<(&'a Entity, &'a V)> for EntityIndexMap<V>where
V: Copy,
impl<'a, V> Extend<(&'a Entity, &'a V)> for EntityIndexMap<V>where
V: Copy,
Source§fn extend<T>(&mut self, iter: T)
fn extend<T>(&mut self, iter: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<V> Extend<(Entity, V)> for EntityIndexMap<V>
impl<V> Extend<(Entity, V)> for EntityIndexMap<V>
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = (Entity, V)>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = (Entity, V)>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl<V> FromArg for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl<V> FromArg for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl<V> FromIterator<(Entity, V)> for EntityIndexMap<V>
impl<V> FromIterator<(Entity, V)> for EntityIndexMap<V>
Source§fn from_iter<I>(iterable: I) -> EntityIndexMap<V>where
I: IntoIterator<Item = (Entity, V)>,
fn from_iter<I>(iterable: I) -> EntityIndexMap<V>where
I: IntoIterator<Item = (Entity, V)>,
Source§impl<V> FromReflect for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl<V> FromReflect for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn from_reflect(
reflect: &(dyn PartialReflect + 'static),
) -> Option<EntityIndexMap<V>>
fn from_reflect( reflect: &(dyn PartialReflect + 'static), ) -> Option<EntityIndexMap<V>>
Self from a reflected value.Source§fn take_from_reflect(
reflect: Box<dyn PartialReflect>,
) -> Result<Self, Box<dyn PartialReflect>>
fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>
Self using,
constructing the value using from_reflect if that fails. Read moreSource§impl<V> GetOwnership for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl<V> GetOwnership for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§impl<V> GetTypeRegistration for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl<V> GetTypeRegistration for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn get_type_registration() -> TypeRegistration
fn get_type_registration() -> TypeRegistration
TypeRegistration for this type.Source§fn register_type_dependencies(registry: &mut TypeRegistry)
fn register_type_dependencies(registry: &mut TypeRegistry)
Source§impl<V, Q> Index<&Q> for EntityIndexMap<V>where
Q: EntityEquivalent + ?Sized,
impl<V, Q> Index<&Q> for EntityIndexMap<V>where
Q: EntityEquivalent + ?Sized,
Source§impl<V> Index<RangeFull> for EntityIndexMap<V>
impl<V> Index<RangeFull> for EntityIndexMap<V>
Source§impl<V> Index<RangeInclusive<usize>> for EntityIndexMap<V>
impl<V> Index<RangeInclusive<usize>> for EntityIndexMap<V>
Source§fn index(
&self,
key: RangeInclusive<usize>,
) -> &<EntityIndexMap<V> as Index<RangeInclusive<usize>>>::Output
fn index( &self, key: RangeInclusive<usize>, ) -> &<EntityIndexMap<V> as Index<RangeInclusive<usize>>>::Output
container[index]) operation. Read moreSource§impl<V> Index<RangeToInclusive<usize>> for EntityIndexMap<V>
impl<V> Index<RangeToInclusive<usize>> for EntityIndexMap<V>
Source§fn index(
&self,
key: RangeToInclusive<usize>,
) -> &<EntityIndexMap<V> as Index<RangeToInclusive<usize>>>::Output
fn index( &self, key: RangeToInclusive<usize>, ) -> &<EntityIndexMap<V> as Index<RangeToInclusive<usize>>>::Output
container[index]) operation. Read moreSource§impl<V> Index<usize> for EntityIndexMap<V>
impl<V> Index<usize> for EntityIndexMap<V>
Source§impl<V, Q> IndexMut<&Q> for EntityIndexMap<V>where
Q: EntityEquivalent + ?Sized,
impl<V, Q> IndexMut<&Q> for EntityIndexMap<V>where
Q: EntityEquivalent + ?Sized,
Source§impl<V> IndexMut<RangeFull> for EntityIndexMap<V>
impl<V> IndexMut<RangeFull> for EntityIndexMap<V>
Source§impl<V> IndexMut<RangeInclusive<usize>> for EntityIndexMap<V>
impl<V> IndexMut<RangeInclusive<usize>> for EntityIndexMap<V>
Source§fn index_mut(
&mut self,
key: RangeInclusive<usize>,
) -> &mut <EntityIndexMap<V> as Index<RangeInclusive<usize>>>::Output
fn index_mut( &mut self, key: RangeInclusive<usize>, ) -> &mut <EntityIndexMap<V> as Index<RangeInclusive<usize>>>::Output
container[index]) operation. Read moreSource§impl<V> IndexMut<RangeToInclusive<usize>> for EntityIndexMap<V>
impl<V> IndexMut<RangeToInclusive<usize>> for EntityIndexMap<V>
Source§fn index_mut(
&mut self,
key: RangeToInclusive<usize>,
) -> &mut <EntityIndexMap<V> as Index<RangeToInclusive<usize>>>::Output
fn index_mut( &mut self, key: RangeToInclusive<usize>, ) -> &mut <EntityIndexMap<V> as Index<RangeToInclusive<usize>>>::Output
container[index]) operation. Read moreSource§impl<V> IndexMut<usize> for EntityIndexMap<V>
impl<V> IndexMut<usize> for EntityIndexMap<V>
Source§impl<'a, V> IntoIterator for &'a EntityIndexMap<V>
impl<'a, V> IntoIterator for &'a EntityIndexMap<V>
Source§impl<'a, V> IntoIterator for &'a mut EntityIndexMap<V>
impl<'a, V> IntoIterator for &'a mut EntityIndexMap<V>
Source§impl<V> IntoIterator for EntityIndexMap<V>
impl<V> IntoIterator for EntityIndexMap<V>
Source§impl<V> IntoReturn for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl<V> IntoReturn for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_return<'into_return>(self) -> Return<'into_return>where
EntityIndexMap<V>: 'into_return,
fn into_return<'into_return>(self) -> Return<'into_return>where
EntityIndexMap<V>: 'into_return,
Source§impl<V1, V2> PartialEq<EntityIndexMap<V2>> for EntityIndexMap<V1>where
V1: PartialEq<V2>,
impl<V1, V2> PartialEq<EntityIndexMap<V2>> for EntityIndexMap<V1>where
V1: PartialEq<V2>,
Source§fn eq(&self, other: &EntityIndexMap<V2>) -> bool
fn eq(&self, other: &EntityIndexMap<V2>) -> bool
self and other values to be equal, and is used by ==.Source§impl<V1, V2, S2> PartialEq<IndexMap<Entity, V2, S2>> for EntityIndexMap<V1>where
V1: PartialEq<V2>,
S2: BuildHasher,
impl<V1, V2, S2> PartialEq<IndexMap<Entity, V2, S2>> for EntityIndexMap<V1>where
V1: PartialEq<V2>,
S2: BuildHasher,
Source§impl<V> PartialReflect for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl<V> PartialReflect for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
fn get_represented_type_info(&self) -> Option<&'static TypeInfo>
Source§fn try_apply(
&mut self,
value: &(dyn PartialReflect + 'static),
) -> Result<(), ApplyError>
fn try_apply( &mut self, value: &(dyn PartialReflect + 'static), ) -> Result<(), ApplyError>
Source§fn reflect_kind(&self) -> ReflectKind
fn reflect_kind(&self) -> ReflectKind
Source§fn reflect_ref(&self) -> ReflectRef<'_>
fn reflect_ref(&self) -> ReflectRef<'_>
Source§fn reflect_mut(&mut self) -> ReflectMut<'_>
fn reflect_mut(&mut self) -> ReflectMut<'_>
Source§fn reflect_owned(self: Box<EntityIndexMap<V>>) -> ReflectOwned
fn reflect_owned(self: Box<EntityIndexMap<V>>) -> ReflectOwned
Source§fn try_into_reflect(
self: Box<EntityIndexMap<V>>,
) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
fn try_into_reflect( self: Box<EntityIndexMap<V>>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>
Source§fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
fn try_as_reflect(&self) -> Option<&(dyn Reflect + 'static)>
Source§fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
fn try_as_reflect_mut(&mut self) -> Option<&mut (dyn Reflect + 'static)>
Source§fn into_partial_reflect(self: Box<EntityIndexMap<V>>) -> Box<dyn PartialReflect>
fn into_partial_reflect(self: Box<EntityIndexMap<V>>) -> Box<dyn PartialReflect>
Source§fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
fn as_partial_reflect(&self) -> &(dyn PartialReflect + 'static)
Source§fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
fn as_partial_reflect_mut(&mut self) -> &mut (dyn PartialReflect + 'static)
Source§fn reflect_partial_eq(
&self,
value: &(dyn PartialReflect + 'static),
) -> Option<bool>
fn reflect_partial_eq( &self, value: &(dyn PartialReflect + 'static), ) -> Option<bool>
Source§fn reflect_partial_cmp(
&self,
value: &(dyn PartialReflect + 'static),
) -> Option<Ordering>
fn reflect_partial_cmp( &self, value: &(dyn PartialReflect + 'static), ) -> Option<Ordering>
Source§fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>
Self using reflection. Read moreSource§fn apply(&mut self, value: &(dyn PartialReflect + 'static))
fn apply(&mut self, value: &(dyn PartialReflect + 'static))
Source§fn to_dynamic(&self) -> Box<dyn PartialReflect>
fn to_dynamic(&self) -> Box<dyn PartialReflect>
Source§fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
PartialReflect, combines reflect_clone and
take in a useful fashion, automatically constructing an appropriate
ReflectCloneError if the downcast fails.Source§fn reflect_hash(&self) -> Option<u64>
fn reflect_hash(&self) -> Option<u64>
Source§fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn debug(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Source§fn is_dynamic(&self) -> bool
fn is_dynamic(&self) -> bool
Source§impl<V> Reflect for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl<V> Reflect for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn into_any(self: Box<EntityIndexMap<V>>) -> Box<dyn Any>
fn into_any(self: Box<EntityIndexMap<V>>) -> Box<dyn Any>
Box<dyn Any>. Read moreSource§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut dyn Any. Read moreSource§fn into_reflect(self: Box<EntityIndexMap<V>>) -> Box<dyn Reflect>
fn into_reflect(self: Box<EntityIndexMap<V>>) -> Box<dyn Reflect>
Source§fn as_reflect(&self) -> &(dyn Reflect + 'static)
fn as_reflect(&self) -> &(dyn Reflect + 'static)
Source§fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
fn as_reflect_mut(&mut self) -> &mut (dyn Reflect + 'static)
Source§impl<V> Serialize for EntityIndexMap<V>where
V: Serialize,
impl<V> Serialize for EntityIndexMap<V>where
V: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl<V> TupleStruct for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl<V> TupleStruct for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Source§fn field(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
fn field(&self, index: usize) -> Option<&(dyn PartialReflect + 'static)>
index as a
&dyn Reflect.Source§fn field_mut(
&mut self,
index: usize,
) -> Option<&mut (dyn PartialReflect + 'static)>
fn field_mut( &mut self, index: usize, ) -> Option<&mut (dyn PartialReflect + 'static)>
index
as a &mut dyn Reflect.Source§fn iter_fields(&self) -> TupleStructFieldIter<'_> ⓘ
fn iter_fields(&self) -> TupleStructFieldIter<'_> ⓘ
Source§fn to_dynamic_tuple_struct(&self) -> DynamicTupleStruct
fn to_dynamic_tuple_struct(&self) -> DynamicTupleStruct
DynamicTupleStruct from this tuple struct.Source§fn get_represented_tuple_struct_info(&self) -> Option<&'static TupleStructInfo>
fn get_represented_tuple_struct_info(&self) -> Option<&'static TupleStructInfo>
None if TypeInfo is not available.Source§impl<V> TypePath for EntityIndexMap<V>
impl<V> TypePath for EntityIndexMap<V>
Source§fn type_path() -> &'static str
fn type_path() -> &'static str
Source§fn short_type_path() -> &'static str
fn short_type_path() -> &'static str
Source§fn type_ident() -> Option<&'static str>
fn type_ident() -> Option<&'static str>
Source§fn crate_name() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
Source§impl<V> Typed for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
impl<V> Typed for EntityIndexMap<V>where
EntityIndexMap<V>: Any + Send + Sync,
V: TypePath,
IndexMap<Entity, V, EntityHash>: FromReflect + TypePath + MaybeTyped + RegisterForReflection,
Auto Trait Implementations§
impl<V> Freeze for EntityIndexMap<V>
impl<V> RefUnwindSafe for EntityIndexMap<V>where
V: RefUnwindSafe,
impl<V> Send for EntityIndexMap<V>where
V: Send,
impl<V> Sync for EntityIndexMap<V>where
V: Sync,
impl<V> Unpin for EntityIndexMap<V>where
V: Unpin,
impl<V> UnsafeUnpin for EntityIndexMap<V>
impl<V> UnwindSafe for EntityIndexMap<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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
impl<T> Brush for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<T> DynamicTypePath for Twhere
T: TypePath,
impl<T> DynamicTypePath for Twhere
T: TypePath,
Source§fn reflect_type_path(&self) -> &str
fn reflect_type_path(&self) -> &str
TypePath::type_path.Source§fn reflect_short_type_path(&self) -> &str
fn reflect_short_type_path(&self) -> &str
Source§fn reflect_type_ident(&self) -> Option<&str>
fn reflect_type_ident(&self) -> Option<&str>
TypePath::type_ident.Source§fn reflect_crate_name(&self) -> Option<&str>
fn reflect_crate_name(&self) -> Option<&str>
TypePath::crate_name.Source§fn reflect_module_path(&self) -> Option<&str>
fn reflect_module_path(&self) -> Option<&str>
Source§impl<T> DynamicTyped for Twhere
T: Typed,
impl<T> DynamicTyped for Twhere
T: Typed,
Source§fn reflect_type_info(&self) -> &'static TypeInfo
fn reflect_type_info(&self) -> &'static TypeInfo
Typed::type_info.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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T> GetPath for T
impl<T> GetPath for T
Source§fn reflect_path<'p>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>
path. Read moreSource§fn reflect_path_mut<'p>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>
path. Read moreSource§fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
fn path<'p, T>(
&self,
path: impl ReflectPath<'p>,
) -> Result<&T, ReflectPathError<'p>>where
T: Reflect,
path. Read moreSource§fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
fn path_mut<'p, T>(
&mut self,
path: impl ReflectPath<'p>,
) -> Result<&mut T, ReflectPathError<'p>>where
T: Reflect,
path. Read moreSource§impl<S> GetTupleStructField for Swhere
S: TupleStruct,
impl<S> GetTupleStructField for Swhere
S: TupleStruct,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T> HitDataExtra for T
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Source§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<G> PatchFromTemplate for Gwhere
G: FromTemplate,
impl<G> PatchFromTemplate for Gwhere
G: FromTemplate,
Source§fn patch<F>(func: F) -> TemplatePatch<F, <G as PatchFromTemplate>::Template>
fn patch<F>(func: F) -> TemplatePatch<F, <G as PatchFromTemplate>::Template>
func, and turns it into a TemplatePatch.Source§impl<T> PatchTemplate for Twhere
T: Template,
impl<T> PatchTemplate for Twhere
T: Template,
Source§fn patch_template<F>(func: F) -> TemplatePatch<F, T>
fn patch_template<F>(func: F) -> TemplatePatch<F, T>
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().impl<T> Reflectable for T
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
impl<T> Settings for T
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.