pub trait Headless {
// Required methods
fn new(default_font: Font, default_text_size: Pixels) -> Self;
fn screenshot(
&mut self,
size: Size<u32>,
scale_factor: f32,
background_color: Color,
) -> Vec<u8>;
}
Expand description
A headless renderer is a renderer that can render offscreen without a window nor a compositor.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.