pub trait Renderer {
// Required methods
fn target(&self) -> TargetDescriptor;
fn resize(&mut self, width: u32, height: u32) -> Result<(), Error>;
fn render(
&mut self,
request: RenderRequest<'_>,
) -> Result<FrameOutput, Error>;
}Required Methods§
fn target(&self) -> TargetDescriptor
Sourcefn resize(&mut self, width: u32, height: u32) -> Result<(), Error>
fn resize(&mut self, width: u32, height: u32) -> Result<(), Error>
Changes logical target dimensions without changing target ownership.
§Errors
Returns a typed backend or target error when resizing cannot complete.
Sourcefn render(&mut self, request: RenderRequest<'_>) -> Result<FrameOutput, Error>
fn render(&mut self, request: RenderRequest<'_>) -> Result<FrameOutput, Error>
Renders exactly one immutable scene revision.
§Errors
Returns a typed backend, surface, resource, or validation error.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".