summaryrefslogtreecommitdiffstats
path: root/wgpu/src/primitive.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-21 22:27:17 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-21 22:27:17 +0100
commit3645d34d6a1ba1247238e830e9eefd52d9e5b986 (patch)
tree2d38961161df0a85c1667474b2b696aab86b7160 /wgpu/src/primitive.rs
parent7e4ae8450e1f28c15717ca5ca9748981af9c9541 (diff)
downloadiced-3645d34d6a1ba1247238e830e9eefd52d9e5b986.tar.gz
iced-3645d34d6a1ba1247238e830e9eefd52d9e5b986.tar.bz2
iced-3645d34d6a1ba1247238e830e9eefd52d9e5b986.zip
Implement composable, type-safe renderer fallback
Diffstat (limited to 'wgpu/src/primitive.rs')
-rw-r--r--wgpu/src/primitive.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/wgpu/src/primitive.rs b/wgpu/src/primitive.rs
index fff927ea..ee9af93c 100644
--- a/wgpu/src/primitive.rs
+++ b/wgpu/src/primitive.rs
@@ -28,3 +28,11 @@ impl Damage for Custom {
}
}
}
+
+impl TryFrom<Mesh> for Custom {
+ type Error = &'static str;
+
+ fn try_from(mesh: Mesh) -> Result<Self, Self::Error> {
+ Ok(Custom::Mesh(mesh))
+ }
+}