render: move Error type into associated types

This commit is contained in:
2024-12-01 21:28:34 +01:00
parent 5c10dcbd7d
commit 132d7c0a33
2 changed files with 4 additions and 2 deletions

View File

@@ -29,7 +29,8 @@ pub trait Shader: Send + Sync {
pub trait Surfaces: Send + Sync {
type Surface: Surface;
fn new_surface(&mut self, area: &Rectangle<Virtual>) -> Result<Self::Surface, io::Error>;
type Error: Debug;
fn new_surface(&mut self, area: &Rectangle<Virtual>) -> Result<Self::Surface, Self::Error>;
fn render_to<S: Sample>(&self, output: &mut S, frame: usize);
}