renderer: Document `Frame` Associated Type and Trait
This commit is contained in:
parent
7aa0c43396
commit
87d33fc42e
|
@ -139,6 +139,7 @@ pub trait Texture {
|
||||||
fn height(&self) -> u32;
|
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 {
|
pub trait Frame {
|
||||||
/// Error type returned by the rendering operations of this renderer.
|
/// Error type returned by the rendering operations of this renderer.
|
||||||
type Error: Error;
|
type Error: Error;
|
||||||
|
@ -198,7 +199,7 @@ pub trait Renderer {
|
||||||
type Error: Error;
|
type Error: Error;
|
||||||
/// Texture Handle type used by this renderer.
|
/// Texture Handle type used by this renderer.
|
||||||
type TextureId: Texture;
|
type TextureId: Texture;
|
||||||
|
/// Type representing a currently in-progress frame during the [`Renderer::render`]-call
|
||||||
type Frame: Frame<Error = Self::Error, TextureId = Self::TextureId>;
|
type Frame: Frame<Error = Self::Error, TextureId = Self::TextureId>;
|
||||||
|
|
||||||
/// Import a given bitmap into the renderer.
|
/// Import a given bitmap into the renderer.
|
||||||
|
|
Loading…
Reference in New Issue