pub struct ComponentPreviewOptions {
pub width: Option<f32>,
pub height: Option<f32>,
pub dpi_factor: f32,
pub background_color: ColorU,
}Expand description
Options for rendering a component preview.
Fields§
§width: Option<f32>Optional width constraint. If None, size to content (uses 4096px max).
height: Option<f32>Optional height constraint. If None, size to content (uses 4096px max).
dpi_factor: f32DPI scale factor. Default 1.0.
background_color: ColorUBackground color. Default white.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ComponentPreviewOptions
impl RefUnwindSafe for ComponentPreviewOptions
impl Send for ComponentPreviewOptions
impl Sync for ComponentPreviewOptions
impl Unpin for ComponentPreviewOptions
impl UnsafeUnpin for ComponentPreviewOptions
impl UnwindSafe for ComponentPreviewOptions
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> 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