summaryrefslogtreecommitdiffstats
path: root/graphics/src/cached.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-05-01 00:28:06 +0200
committerLibravatar GitHub <noreply@github.com>2024-05-01 00:28:06 +0200
commit89892f1760d4ec67f458d67ae722c3f06d524a1b (patch)
treef38448b997dc2c9d597e11949b32443824d298e4 /graphics/src/cached.rs
parent24501fd73b5ae884367a2d112ff44625058b876b (diff)
parent62433a65e92c025cd9c36e81fc16bab77790bacb (diff)
downloadiced-89892f1760d4ec67f458d67ae722c3f06d524a1b.tar.gz
iced-89892f1760d4ec67f458d67ae722c3f06d524a1b.tar.bz2
iced-89892f1760d4ec67f458d67ae722c3f06d524a1b.zip
Merge pull request #2415 from iced-rs/feature/canvas-cache-groups
`canvas::Cache` Grouping
Diffstat (limited to 'graphics/src/cached.rs')
-rw-r--r--graphics/src/cached.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/graphics/src/cached.rs b/graphics/src/cached.rs
deleted file mode 100644
index c0e4e029..00000000
--- a/graphics/src/cached.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-/// A piece of data that can be cached.
-pub trait Cached: Sized {
- /// The type of cache produced.
- type Cache: Clone;
-
- /// Loads the [`Cache`] into a proper instance.
- ///
- /// [`Cache`]: Self::Cache
- fn load(cache: &Self::Cache) -> Self;
-
- /// Caches this value, producing its corresponding [`Cache`].
- ///
- /// [`Cache`]: Self::Cache
- fn cache(self, previous: Option<Self::Cache>) -> Self::Cache;
-}
-
-#[cfg(debug_assertions)]
-impl Cached for () {
- type Cache = ();
-
- fn load(_cache: &Self::Cache) -> Self {}
-
- fn cache(self, _previous: Option<Self::Cache>) -> Self::Cache {}
-}