Struct sixtyfps_corelib::item_rendering::CachedRenderingData [−][src]
#[repr(C)]pub struct CachedRenderingData { /* fields omitted */ }
This structure must be present in items that are Rendered and contains information. Used by the backend.
Implementations
impl CachedRenderingData
[src]
impl CachedRenderingData
[src]pub fn ensure_up_to_date<T: Clone>(
&self,
cache: &mut RenderingCache<T>,
update_fn: impl FnOnce() -> T
) -> T
[src]
&self,
cache: &mut RenderingCache<T>,
update_fn: impl FnOnce() -> T
) -> T
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.
pub fn release<T>(&self, cache: &mut RenderingCache<T>)
[src]
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.
Trait Implementations
impl Default for CachedRenderingData
[src]
impl Default for CachedRenderingData
[src]fn default() -> CachedRenderingData
[src]
Auto Trait Implementations
impl !RefUnwindSafe for CachedRenderingData
impl !RefUnwindSafe for CachedRenderingData
impl Send for CachedRenderingData
impl Send for CachedRenderingData
impl !Sync for CachedRenderingData
impl !Sync for CachedRenderingData
impl Unpin for CachedRenderingData
impl Unpin for CachedRenderingData
impl UnwindSafe for CachedRenderingData
impl UnwindSafe for CachedRenderingData