Type Alias bevy::reflect::utility::GenericTypePathCell
source · pub type GenericTypePathCell = GenericTypeCell<TypePathComponent>;
Expand description
See GenericTypeCell
.
Aliased Type§
struct GenericTypePathCell(/* private fields */);
Implementations
source§impl<T> GenericTypeCell<T>where
T: TypedProperty,
impl<T> GenericTypeCell<T>where
T: TypedProperty,
sourcepub const fn new() -> GenericTypeCell<T>
pub const fn new() -> GenericTypeCell<T>
Initialize a GenericTypeCell
for generic types.
sourcepub fn get_or_insert<G, F>(&self, f: F) -> &<T as TypedProperty>::Stored
pub fn get_or_insert<G, F>(&self, f: F) -> &<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.
Trait Implementations
source§impl<T> Default for GenericTypeCell<T>where
T: TypedProperty,
impl<T> Default for GenericTypeCell<T>where
T: TypedProperty,
source§fn default() -> GenericTypeCell<T>
fn default() -> GenericTypeCell<T>
Returns the “default value” for a type. Read more