pub struct CaptureSnapshotParams {
pub computed_styles: Vec<String>,
pub include_dom_rects: Option<bool>,
pub include_blended_background_colors: Option<bool>,
pub include_text_color_opacities: Option<bool>,
pub include_paint_order: Option<bool>,
}Expand description
Parameters for DOMSnapshot.captureSnapshot.
Fields§
§computed_styles: Vec<String>Whitelist of computed styles to return.
include_dom_rects: Option<bool>Whether to include DOM rectangles (for layout/CSS painting).
include_blended_background_colors: Option<bool>Whether to include blended background colors.
include_text_color_opacities: Option<bool>Whether to include text color opacities.
include_paint_order: Option<bool>Whether to include paint orders.
Implementations§
Source§impl CaptureSnapshotParams
impl CaptureSnapshotParams
Sourcepub fn with_styles(styles: Vec<String>) -> Self
pub fn with_styles(styles: Vec<String>) -> Self
Create params with custom computed styles.
Sourcepub fn include_dom_rects(self, include: bool) -> Self
pub fn include_dom_rects(self, include: bool) -> Self
Set whether to include DOM rectangles.
Sourcepub fn include_blended_background_colors(self, include: bool) -> Self
pub fn include_blended_background_colors(self, include: bool) -> Self
Set whether to include blended background colors.
Trait Implementations§
Source§impl Clone for CaptureSnapshotParams
impl Clone for CaptureSnapshotParams
Source§fn clone(&self) -> CaptureSnapshotParams
fn clone(&self) -> CaptureSnapshotParams
Returns a duplicate of the value. Read more
1.0.0 · 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 CaptureSnapshotParams
impl Debug for CaptureSnapshotParams
Source§impl Default for CaptureSnapshotParams
impl Default for CaptureSnapshotParams
Source§fn default() -> CaptureSnapshotParams
fn default() -> CaptureSnapshotParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CaptureSnapshotParams
impl RefUnwindSafe for CaptureSnapshotParams
impl Send for CaptureSnapshotParams
impl Sync for CaptureSnapshotParams
impl Unpin for CaptureSnapshotParams
impl UnwindSafe for CaptureSnapshotParams
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