pub struct TooltipMap {
pub map: HashMap<String, TooltipsData>,
}Expand description
The data of your tooltips.
When a TooltipTermLink is activated the string inside of it will be used as key
for the hashmap and its result will populate the tooltip.
See TooltipsData.
Fields§
§map: HashMap<String, TooltipsData>Methods from Deref<Target = HashMap<String, TooltipsData>>§
Sourcepub fn hasher(&self) -> &S
pub fn hasher(&self) -> &S
Returns a reference to the map’s BuildHasher, or S parameter.
Refer to hasher for further details.
Sourcepub fn keys(&self) -> Keys<'_, K, V> ⓘ
pub fn keys(&self) -> Keys<'_, K, V> ⓘ
An iterator visiting all keys in arbitrary order.
The iterator element type is &'a K.
Refer to keys for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
for key in map.keys() {
// foo, bar, baz
// Note that the above order is not guaranteed
}Sourcepub fn values(&self) -> Values<'_, K, V> ⓘ
pub fn values(&self) -> Values<'_, K, V> ⓘ
An iterator visiting all values in arbitrary order.
The iterator element type is &'a V.
Refer to values for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
for key in map.values() {
// 0, 1, 2
// Note that the above order is not guaranteed
}Sourcepub fn values_mut(&mut self) -> ValuesMut<'_, K, V> ⓘ
pub fn values_mut(&mut self) -> ValuesMut<'_, K, V> ⓘ
An iterator visiting all values mutably in arbitrary order.
The iterator element type is &'a mut V.
Refer to values for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
for key in map.values_mut() {
// 0, 1, 2
// Note that the above order is not guaranteed
}Sourcepub fn iter(&self) -> Iter<'_, K, V> ⓘ
pub fn iter(&self) -> Iter<'_, K, V> ⓘ
An iterator visiting all key-value pairs in arbitrary order.
The iterator element type is (&'a K, &'a V).
Refer to iter for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
for (key, value) in map.iter() {
// ("foo", 0), ("bar", 1), ("baz", 2)
// Note that the above order is not guaranteed
}Sourcepub fn iter_mut(&mut self) -> IterMut<'_, K, V> ⓘ
pub fn iter_mut(&mut self) -> IterMut<'_, K, V> ⓘ
An iterator visiting all key-value pairs in arbitrary order,
with mutable references to the values.
The iterator element type is (&'a K, &'a mut V).
Refer to iter_mut for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
for (key, value) in map.iter_mut() {
// ("foo", 0), ("bar", 1), ("baz", 2)
// Note that the above order is not guaranteed
}Sourcepub fn drain(&mut self) -> Drain<'_, K, V> ⓘ
pub fn drain(&mut self) -> Drain<'_, K, V> ⓘ
Clears the map, returning all key-value pairs as an iterator. Keeps the allocated memory for reuse.
Refer to drain for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
for (key, value) in map.drain() {
// ("foo", 0), ("bar", 1), ("baz", 2)
// Note that the above order is not guaranteed
}
assert!(map.is_empty());Sourcepub fn extract_if<F>(&mut self, f: F) -> ExtractIf<'_, K, V, F> ⓘ
pub fn extract_if<F>(&mut self, f: F) -> ExtractIf<'_, K, V, F> ⓘ
Drains elements which are true under the given predicate, and returns an iterator over the removed items.
Refer to extract_if for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
let extracted = map
.extract_if(|key, value| *value == 2)
.collect::<Vec<_>>();
assert_eq!(map.len(), 2);
assert_eq!(extracted.len(), 1);Sourcepub fn reserve(&mut self, additional: usize)
pub fn reserve(&mut self, additional: usize)
Reserves capacity for at least additional more elements to be inserted
in the HashMap. The collection may reserve more space to avoid
frequent reallocations.
Refer to reserve for further details.
§Examples
let mut map = HashMap::with_capacity(5);
assert!(map.capacity() >= 5);
map.reserve(10);
assert!(map.capacity() - map.len() >= 10);Sourcepub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>
Tries to reserve capacity for at least additional more elements to be inserted
in the given HashMap<K,V>. The collection may reserve more space to avoid
frequent reallocations.
Refer to try_reserve for further details.
§Examples
let mut map = HashMap::with_capacity(5);
assert!(map.capacity() >= 5);
map.try_reserve(10).expect("Out of Memory!");
assert!(map.capacity() - map.len() >= 10);Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrinks the capacity of the map as much as possible. It will drop down as much as possible while maintaining the internal rules and possibly leaving some space in accordance with the resize policy.
Refer to shrink_to_fit for further details.
§Examples
let mut map = HashMap::with_capacity(5);
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
assert!(map.capacity() >= 5);
map.shrink_to_fit();
assert_eq!(map.capacity(), 3);Sourcepub fn shrink_to(&mut self, min_capacity: usize)
pub fn shrink_to(&mut self, min_capacity: usize)
Shrinks the capacity of the map with a lower limit. It will drop down no lower than the supplied limit while maintaining the internal rules and possibly leaving some space in accordance with the resize policy.
Refer to shrink_to for further details.
Sourcepub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
Returns the key-value pair corresponding to the supplied key.
Refer to get_key_value for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
assert_eq!(map.get_key_value("foo"), Some((&"foo", &0)));Sourcepub fn get_key_value_mut<Q>(&mut self, k: &Q) -> Option<(&K, &mut V)>
pub fn get_key_value_mut<Q>(&mut self, k: &Q) -> Option<(&K, &mut V)>
Returns the key-value pair corresponding to the supplied key, with a mutable reference to value.
Refer to get_key_value_mut for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
assert_eq!(map.get_key_value_mut("foo"), Some((&"foo", &mut 0)));Sourcepub fn contains_key<Q>(&self, k: &Q) -> bool
pub fn contains_key<Q>(&self, k: &Q) -> bool
Returns true if the map contains a value for the specified key.
Refer to contains_key for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
assert!(map.contains_key("foo"));Sourcepub fn get_disjoint_mut<Q, const N: usize>(
&mut self,
ks: [&Q; N],
) -> [Option<&mut V>; N]
pub fn get_disjoint_mut<Q, const N: usize>( &mut self, ks: [&Q; N], ) -> [Option<&mut V>; N]
Attempts to get mutable references to N values in the map at once.
Refer to get_disjoint_mut for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
let result = map.get_disjoint_mut(["foo", "bar"]);
assert_eq!(result, [Some(&mut 0), Some(&mut 1)]);Sourcepub fn get_disjoint_key_value_mut<Q, const N: usize>(
&mut self,
ks: [&Q; N],
) -> [Option<(&K, &mut V)>; N]
pub fn get_disjoint_key_value_mut<Q, const N: usize>( &mut self, ks: [&Q; N], ) -> [Option<(&K, &mut V)>; N]
Attempts to get mutable references to N values in the map at once, with immutable
references to the corresponding keys.
Refer to get_disjoint_key_value_mut for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
map.insert("bar", 1);
map.insert("baz", 2);
let result = map.get_disjoint_key_value_mut(["foo", "bar"]);
assert_eq!(result, [Some((&"foo", &mut 0)), Some((&"bar", &mut 1))]);Sourcepub fn try_insert(
&mut self,
key: K,
value: V,
) -> Result<&mut V, OccupiedError<'_, K, V, S>>
pub fn try_insert( &mut self, key: K, value: V, ) -> Result<&mut V, OccupiedError<'_, K, V, S>>
Tries to insert a key-value pair into the map, and returns a mutable reference to the value in the entry.
Refer to try_insert for further details.
§Examples
let mut map = HashMap::new();
map.try_insert("foo", 0).unwrap();
assert!(map.try_insert("foo", 1).is_err());Sourcepub fn remove_entry<Q>(&mut self, k: &Q) -> Option<(K, V)>
pub fn remove_entry<Q>(&mut self, k: &Q) -> Option<(K, V)>
Removes a key from the map, returning the stored key and value if the key was previously in the map. Keeps the allocated memory for reuse.
Refer to remove_entry for further details.
§Examples
let mut map = HashMap::new();
map.insert("foo", 0);
assert_eq!(map.remove_entry("foo"), Some(("foo", 0)));
assert!(map.is_empty());Sourcepub fn allocation_size(&self) -> usize
pub fn allocation_size(&self) -> usize
Returns the total amount of memory allocated internally by the hash set, in bytes.
Refer to allocation_size for further details.
§Examples
let mut map = HashMap::new();
assert_eq!(map.allocation_size(), 0);
map.insert("foo", 0u32);
assert!(map.allocation_size() >= size_of::<&'static str>() + size_of::<u32>());Sourcepub unsafe fn insert_unique_unchecked(
&mut self,
key: K,
value: V,
) -> (&K, &mut V)
pub unsafe fn insert_unique_unchecked( &mut self, key: K, value: V, ) -> (&K, &mut V)
Insert a key-value pair into the map without checking if the key already exists in the map.
Refer to insert_unique_unchecked for further details.
§Safety
This operation is safe if a key does not exist in the map.
However, if a key exists in the map already, the behavior is unspecified: this operation may panic, loop forever, or any following operation with the map may panic, loop forever or return arbitrary result.
That said, this operation (and following operations) are guaranteed to not violate memory safety.
However this operation is still unsafe because the resulting HashMap
may be passed to unsafe code which does expect the map to behave
correctly, and would cause unsoundness as a result.
Sourcepub unsafe fn get_disjoint_unchecked_mut<Q, const N: usize>(
&mut self,
keys: [&Q; N],
) -> [Option<&mut V>; N]
pub unsafe fn get_disjoint_unchecked_mut<Q, const N: usize>( &mut self, keys: [&Q; N], ) -> [Option<&mut V>; N]
Attempts to get mutable references to N values in the map at once, without validating that
the values are unique.
Refer to get_disjoint_unchecked_mut for further details.
Returns an array of length N with the results of each query. None will be used if
the key is missing.
For a safe alternative see get_disjoint_mut.
§Safety
Calling this method with overlapping keys is undefined behavior even if the resulting references are not used.
Sourcepub unsafe fn get_disjoint_key_value_unchecked_mut<Q, const N: usize>(
&mut self,
keys: [&Q; N],
) -> [Option<(&K, &mut V)>; N]
pub unsafe fn get_disjoint_key_value_unchecked_mut<Q, const N: usize>( &mut self, keys: [&Q; N], ) -> [Option<(&K, &mut V)>; N]
Attempts to get mutable references to N values in the map at once, with immutable
references to the corresponding keys, without validating that the values are unique.
Refer to get_disjoint_key_value_unchecked_mut for further details.
Returns an array of length N with the results of each query. None will be returned if
any of the keys are missing.
For a safe alternative see get_disjoint_key_value_mut.
§Safety
Calling this method with overlapping keys is undefined behavior even if the resulting references are not used.
Methods from Deref<Target = HashMap<K, V, S>>§
Sourcepub fn hasher(&self) -> &S
pub fn hasher(&self) -> &S
Returns a reference to the map’s BuildHasher.
§Examples
use hashbrown::HashMap;
use hashbrown::DefaultHashBuilder;
let hasher = DefaultHashBuilder::default();
let map: HashMap<i32, i32> = HashMap::with_hasher(hasher);
let hasher: &DefaultHashBuilder = map.hasher();Sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Returns the number of elements the map can hold without reallocating.
This number is a lower bound; the HashMap<K, V> might be able to hold
more, but is guaranteed to be able to hold at least this many.
§Examples
use hashbrown::HashMap;
let map: HashMap<i32, i32> = HashMap::with_capacity(100);
assert_eq!(map.len(), 0);
assert!(map.capacity() >= 100);Sourcepub fn keys(&self) -> Keys<'_, K, V> ⓘ
pub fn keys(&self) -> Keys<'_, K, V> ⓘ
An iterator visiting all keys in arbitrary order.
The iterator element type is &'a K.
§Examples
use hashbrown::HashMap;
let mut map = HashMap::new();
map.insert("a", 1);
map.insert("b", 2);
map.insert("c", 3);
assert_eq!(map.len(), 3);
let mut vec: Vec<&str> = Vec::new();
for key in map.keys() {
println!("{}", key);
vec.push(*key);
}
// The `Keys` iterator produces keys in arbitrary order, so the
// keys must be sorted to test them against a sorted array.
vec.sort_unstable();
assert_eq!(vec, ["a", "b", "c"]);
assert_eq!(map.len(), 3);Sourcepub fn values(&self) -> Values<'_, K, V> ⓘ
pub fn values(&self) -> Values<'_, K, V> ⓘ
An iterator visiting all values in arbitrary order.
The iterator element type is &'a V.
§Examples
use hashbrown::HashMap;
let mut map = HashMap::new();
map.insert("a", 1);
map.insert("b", 2);
map.insert("c", 3);
assert_eq!(map.len(), 3);
let mut vec: Vec<i32> = Vec::new();
for val in map.values() {
println!("{}", val);
vec.push(*val);
}
// The `Values` iterator produces values in arbitrary order, so the
// values must be sorted to test them against a sorted array.
vec.sort_unstable();
assert_eq!(vec, [1, 2, 3]);
assert_eq!(map.len(), 3);Sourcepub fn iter(&self) -> Iter<'_, K, V> ⓘ
pub fn iter(&self) -> Iter<'_, K, V> ⓘ
An iterator visiting all key-value pairs in arbitrary order.
The iterator element type is (&'a K, &'a V).
§Examples
use hashbrown::HashMap;
let mut map = HashMap::new();
map.insert("a", 1);
map.insert("b", 2);
map.insert("c", 3);
assert_eq!(map.len(), 3);
let mut vec: Vec<(&str, i32)> = Vec::new();
for (key, val) in map.iter() {
println!("key: {} val: {}", key, val);
vec.push((*key, *val));
}
// The `Iter` iterator produces items in arbitrary order, so the
// items must be sorted to test them against a sorted array.
vec.sort_unstable();
assert_eq!(vec, [("a", 1), ("b", 2), ("c", 3)]);
assert_eq!(map.len(), 3);Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of elements in the map.
§Examples
use hashbrown::HashMap;
let mut a = HashMap::new();
assert_eq!(a.len(), 0);
a.insert(1, "a");
assert_eq!(a.len(), 1);Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the map contains no elements.
§Examples
use hashbrown::HashMap;
let mut a = HashMap::new();
assert!(a.is_empty());
a.insert(1, "a");
assert!(!a.is_empty());Sourcepub fn get<Q>(&self, k: &Q) -> Option<&V>
pub fn get<Q>(&self, k: &Q) -> Option<&V>
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but
Hash and Eq on the borrowed form must match those for
the key type.
§Examples
use hashbrown::HashMap;
let mut map = HashMap::new();
map.insert(1, "a");
assert_eq!(map.get(&1), Some(&"a"));
assert_eq!(map.get(&2), None);Sourcepub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
pub fn get_key_value<Q>(&self, k: &Q) -> Option<(&K, &V)>
Returns the key-value pair corresponding to the supplied key.
The supplied key may be any borrowed form of the map’s key type, but
Hash and Eq on the borrowed form must match those for
the key type.
§Examples
use hashbrown::HashMap;
let mut map = HashMap::new();
map.insert(1, "a");
assert_eq!(map.get_key_value(&1), Some((&1, &"a")));
assert_eq!(map.get_key_value(&2), None);Sourcepub fn contains_key<Q>(&self, k: &Q) -> bool
pub fn contains_key<Q>(&self, k: &Q) -> bool
Returns true if the map contains a value for the specified key.
The key may be any borrowed form of the map’s key type, but
Hash and Eq on the borrowed form must match those for
the key type.
§Examples
use hashbrown::HashMap;
let mut map = HashMap::new();
map.insert(1, "a");
assert_eq!(map.contains_key(&1), true);
assert_eq!(map.contains_key(&2), false);Sourcepub fn allocation_size(&self) -> usize
pub fn allocation_size(&self) -> usize
Returns the total amount of memory allocated internally by the hash set, in bytes.
The returned number is informational only. It is intended to be primarily used for memory profiling.
Sourcepub fn raw_entry(&self) -> RawEntryBuilder<'_, K, V, S, A>
pub fn raw_entry(&self) -> RawEntryBuilder<'_, K, V, S, A>
Creates a raw immutable entry builder for the HashMap.
Raw entries provide the lowest level of control for searching and manipulating a map. They must be manually initialized with a hash and then manually searched.
This is useful for
- Hash memoization
- Using a search key that doesn’t work with the Borrow trait
- Using custom comparison logic without newtype wrappers
Unless you are in such a situation, higher-level and more foolproof APIs like
get should be preferred.
Immutable raw entries have very limited use; you might instead want raw_entry_mut.
§Examples
use core::hash::{BuildHasher, Hash};
use hashbrown::HashMap;
let mut map = HashMap::new();
map.extend([("a", 100), ("b", 200), ("c", 300)]);
fn compute_hash<K: Hash + ?Sized, S: BuildHasher>(hash_builder: &S, key: &K) -> u64 {
use core::hash::Hasher;
let mut state = hash_builder.build_hasher();
key.hash(&mut state);
state.finish()
}
for k in ["a", "b", "c", "d", "e", "f"] {
let hash = compute_hash(map.hasher(), k);
let v = map.get(&k).cloned();
let kv = v.as_ref().map(|v| (&k, v));
println!("Key: {} and value: {:?}", k, v);
assert_eq!(map.raw_entry().from_key(&k), kv);
assert_eq!(map.raw_entry().from_hash(hash, |q| *q == k), kv);
assert_eq!(map.raw_entry().from_key_hashed_nocheck(hash, &k), kv);
}Trait Implementations§
Source§impl Component for TooltipMap
impl Component for TooltipMap
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::SparseSet
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::SparseSet
Source§type Mutability = Mutable
type Mutability = Mutable
Component<Mutability = Mutable>,
while immutable components will instead have Component<Mutability = Immutable>. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
ComponentRelationshipAccessor required for working with relationships in dynamic contexts. Read moreSource§fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Source§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
EntityMapper. This is used to remap entities in contexts like scenes and entity cloning.
When deriving Component, this is populated by annotating fields containing entities with #[entities] Read moreSource§impl Debug for TooltipMap
impl Debug for TooltipMap
Source§impl Default for TooltipMap
impl Default for TooltipMap
Source§fn default() -> TooltipMap
fn default() -> TooltipMap
Source§impl Deref for TooltipMap
impl Deref for TooltipMap
Source§impl DerefMut for TooltipMap
impl DerefMut for TooltipMap
impl Resource for TooltipMap
Auto Trait Implementations§
impl Freeze for TooltipMap
impl RefUnwindSafe for TooltipMap
impl Send for TooltipMap
impl Sync for TooltipMap
impl Unpin for TooltipMap
impl UnsafeUnpin for TooltipMap
impl UnwindSafe for TooltipMap
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<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut ComponentsRegistrator<'_>, ) -> impl Iterator<Item = ComponentId> + use<C>
Source§fn get_component_ids(
components: &Components,
) -> impl Iterator<Item = Option<ComponentId>>
fn get_component_ids( components: &Components, ) -> impl Iterator<Item = Option<ComponentId>>
Source§impl<C> BundleFromComponents for Cwhere
C: Component,
impl<C> BundleFromComponents for Cwhere
C: Component,
impl<T> ConditionalSend for Twhere
T: Send,
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> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
Source§unsafe fn get_components(
ptr: MovingPtr<'_, C>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
) -> <C as DynamicBundle>::Effect
unsafe fn get_components( ptr: MovingPtr<'_, C>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), ) -> <C as DynamicBundle>::Effect
Source§unsafe fn apply_effect(
_ptr: MovingPtr<'_, MaybeUninit<C>>,
_entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( _ptr: MovingPtr<'_, MaybeUninit<C>>, _entity: &mut EntityWorldMut<'_>, )
impl<T> ErasedDestructor for Twhere
T: 'static,
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, 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> 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 more