cosmic::iced_winit::graphics::cache

Trait Cached

source
pub trait Cached: Sized {
    type Cache: Clone;

    // Required methods
    fn load(cache: &Self::Cache) -> Self;
    fn cache(self, group: Group, previous: Option<Self::Cache>) -> Self::Cache;
}
Expand description

A piece of data that can be cached.

Required Associated Types§

source

type Cache: Clone

The type of cache produced.

Required Methods§

source

fn load(cache: &Self::Cache) -> Self

Loads the Cache into a proper instance.

source

fn cache(self, group: Group, previous: Option<Self::Cache>) -> Self::Cache

Caches this value, producing its corresponding Cache.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Cached for Geometry

source§

type Cache = Cache

source§

fn load(cache: &Cache) -> Geometry

source§

fn cache(self, _group: Group, _previous: Option<Cache>) -> Cache

source§

impl Cached for ()

source§

type Cache = ()

source§

fn load(_cache: &<() as Cached>::Cache)

source§

fn cache( self, _group: Group, _previous: Option<<() as Cached>::Cache>, ) -> <() as Cached>::Cache

Implementors§