From 87d33fc42ea6a10c9081007c17c752a04358e8f1 Mon Sep 17 00:00:00 2001 From: Victor Brekenfeld Date: Sat, 29 May 2021 17:57:34 +0200 Subject: [PATCH] renderer: Document `Frame` Associated Type and Trait --- src/backend/renderer/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/backend/renderer/mod.rs b/src/backend/renderer/mod.rs index ed1086c..7c25f60 100644 --- a/src/backend/renderer/mod.rs +++ b/src/backend/renderer/mod.rs @@ -139,6 +139,7 @@ pub trait Texture { fn height(&self) -> u32; } +/// Helper trait for [`Renderer`], which defines a rendering api for a currently in-progress frame during [`Renderer::render`]. pub trait Frame { /// Error type returned by the rendering operations of this renderer. type Error: Error; @@ -198,7 +199,7 @@ pub trait Renderer { type Error: Error; /// Texture Handle type used by this renderer. type TextureId: Texture; - + /// Type representing a currently in-progress frame during the [`Renderer::render`]-call type Frame: Frame; /// Import a given bitmap into the renderer.