logo
#[repr(C)]
pub struct CachedRenderingData { /* private fields */ }
Expand description

This structure must be present in items that are Rendered and contains information. Used by the backend.

Implementations

This function allows retrieving the backend specific per-item data cache, updating it if depending properties have changed. The supplied update_fn will be called when properties have changed or the cache is initialized the first time.

This function can be used to remove an entry from the rendering cache for a given item, if it exists, i.e. if any data was ever cached. This is typically called by the graphics backend’s implementation of the release_item_graphics_cache function.

source

pub fn get_entry<'a, T>(
    &self,
    cache: &'a mut RenderingCache<T>
) -> Option<&'a mut CachedGraphicsData<T>>

Return the value if it is in the cache

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.