pub struct HeadlessConfig {
pub width: f32,
pub height: f32,
pub dpi_factor: f32,
pub enable_rendering: bool,
pub max_iterations: Option<usize>,
}Expand description
Configuration for headless rendering.
Fields§
§width: f32Logical window width in CSS pixels
height: f32Logical window height in CSS pixels
dpi_factor: f32DPI scale factor (1.0 = 96 DPI, 2.0 = Retina)
enable_rendering: boolWhether to enable CPU rendering for screenshots (false = layout-only mode, no pixel output)
max_iterations: Option<usize>Maximum number of event loop iterations before auto-close (prevents infinite loops in tests)
Implementations§
Trait Implementations§
Source§impl Clone for HeadlessConfig
impl Clone for HeadlessConfig
Source§fn clone(&self) -> HeadlessConfig
fn clone(&self) -> HeadlessConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeadlessConfig
impl Debug for HeadlessConfig
Auto Trait Implementations§
impl Freeze for HeadlessConfig
impl RefUnwindSafe for HeadlessConfig
impl Send for HeadlessConfig
impl Sync for HeadlessConfig
impl Unpin for HeadlessConfig
impl UnsafeUnpin for HeadlessConfig
impl UnwindSafe for HeadlessConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more