diff options
author | 2024-03-21 22:27:17 +0100 | |
---|---|---|
committer | 2024-03-21 22:27:17 +0100 | |
commit | 3645d34d6a1ba1247238e830e9eefd52d9e5b986 (patch) | |
tree | 2d38961161df0a85c1667474b2b696aab86b7160 /tiny_skia/src/primitive.rs | |
parent | 7e4ae8450e1f28c15717ca5ca9748981af9c9541 (diff) | |
download | iced-3645d34d6a1ba1247238e830e9eefd52d9e5b986.tar.gz iced-3645d34d6a1ba1247238e830e9eefd52d9e5b986.tar.bz2 iced-3645d34d6a1ba1247238e830e9eefd52d9e5b986.zip |
Implement composable, type-safe renderer fallback
Diffstat (limited to '')
-rw-r--r-- | tiny_skia/src/primitive.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tiny_skia/src/primitive.rs b/tiny_skia/src/primitive.rs index 7718d542..b7c428e4 100644 --- a/tiny_skia/src/primitive.rs +++ b/tiny_skia/src/primitive.rs @@ -1,5 +1,5 @@ use crate::core::Rectangle; -use crate::graphics::Damage; +use crate::graphics::{Damage, Mesh}; pub type Primitive = crate::graphics::Primitive<Custom>; @@ -42,3 +42,11 @@ impl Damage for Custom { } } } + +impl TryFrom<Mesh> for Custom { + type Error = &'static str; + + fn try_from(_mesh: Mesh) -> Result<Self, Self::Error> { + Err("unsupported") + } +} |