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]

pub fn ensure_up_to_date<T: Clone>(
    &self,
    cache: &mut RenderingCache<T>,
    update_fn: impl FnOnce() -> T
) -> T
[src]

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 Debug for CachedRenderingData[src]

impl Default for CachedRenderingData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.