Type Alias bevy::reflect::utility::GenericTypePathCell
pub type GenericTypePathCell = GenericTypeCell<TypePathComponent>;
Expand description
See GenericTypeCell
.
Aliased Type§
struct GenericTypePathCell(/* private fields */);
Implementations§
§impl<T> GenericTypeCell<T>where
T: TypedProperty,
impl<T> GenericTypeCell<T>where T: TypedProperty,
pub const fn new() -> GenericTypeCell<T>
pub const fn new() -> GenericTypeCell<T>
Initialize a GenericTypeCell
for generic types.
pub fn get_or_insert<G, F>(&self, f: F) -> &<T as TypedProperty>::Storedwhere
G: Any + ?Sized,
F: FnOnce() -> <T as TypedProperty>::Stored,
pub fn get_or_insert<G, F>(&self, f: F) -> &<T as TypedProperty>::Storedwhere G: Any + ?Sized, F: FnOnce() -> <T as TypedProperty>::Stored,
Returns a reference to the TypedProperty
stored in the cell.
This method will then return the correct TypedProperty
reference for the given type T
.
If there is no entry found, a new one will be generated from the given function.