summaryrefslogtreecommitdiffstats
path: root/graphics/src/backend.rs
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/src/backend.rs')
-rw-r--r--graphics/src/backend.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/src/backend.rs b/graphics/src/backend.rs
index e982b54a..aa7bf4e8 100644
--- a/graphics/src/backend.rs
+++ b/graphics/src/backend.rs
@@ -2,16 +2,16 @@
use crate::core::image;
use crate::core::svg;
use crate::core::Size;
-use crate::Mesh;
+use crate::{Compositor, Mesh, Renderer};
use std::borrow::Cow;
/// The graphics backend of a [`Renderer`].
///
/// [`Renderer`]: crate::Renderer
-pub trait Backend {
+pub trait Backend: Sized {
/// The compositor of this [`Backend`].
- type Compositor;
+ type Compositor: Compositor<Renderer = Renderer<Self>>;
/// The custom kind of primitives this [`Backend`] supports.
type Primitive: TryFrom<Mesh, Error = &'static str>;