summaryrefslogtreecommitdiffstats
path: root/graphics/src/cached.rs
diff options
context:
space:
mode:
authorLibravatar gigas002 <gigas002@pm.me>2024-05-08 19:16:20 +0900
committerLibravatar gigas002 <gigas002@pm.me>2024-05-08 19:16:20 +0900
commitff26fb7df43bd241253af85e0621e2cc030e9cec (patch)
tree2b3272bb178f8757169511966589fe6a106733f4 /graphics/src/cached.rs
parent0ebe0629cef37aee5c48b9409fc36618a3a3e60d (diff)
parent477887b3870aa5fbdab96c3a06f3b930462d7842 (diff)
downloadiced-ff26fb7df43bd241253af85e0621e2cc030e9cec.tar.gz
iced-ff26fb7df43bd241253af85e0621e2cc030e9cec.tar.bz2
iced-ff26fb7df43bd241253af85e0621e2cc030e9cec.zip
Merge branch 'iced-rs-master' into viewer_content_fit
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 {}
-}