pub type NonGenericTypeInfoCell = NonGenericTypeCell<TypeInfo>;
Expand description

Aliased Type§

struct NonGenericTypeInfoCell(/* private fields */);

Implementations§

§

impl<T> NonGenericTypeCell<T>where T: TypedProperty,

pub const fn new() -> NonGenericTypeCell<T>

Initialize a NonGenericTypeCell for non-generic types.

pub fn get_or_set<F>(&self, f: F) -> &<T as TypedProperty>::Storedwhere F: FnOnce() -> <T as TypedProperty>::Stored,

Returns a reference to the TypedProperty stored in the cell.

If there is no entry found, a new one will be generated from the given function.