pub struct CaptureSnapshotBuilder { /* private fields */ }Expand description
Builder for CaptureSnapshot.
Implementations§
Source§impl CaptureSnapshotBuilder
impl CaptureSnapshotBuilder
Sourcepub fn computed_styles<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn computed_styles<VALUE: Into<Vec<String>>>( &mut self, value: VALUE, ) -> &mut Self
Whitelist of computed styles to return.
Sourcepub fn include_paint_order<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn include_paint_order<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Whether to include layout object paint orders into the snapshot.
Sourcepub fn include_dom_rects<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn include_dom_rects<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
Sourcepub fn include_blended_background_colors<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn include_blended_background_colors<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Whether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element.
Sourcepub fn include_text_color_opacities<VALUE: Into<bool>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn include_text_color_opacities<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
Whether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements.
Sourcepub fn build(&self) -> Result<CaptureSnapshot, CaptureSnapshotBuilderError>
pub fn build(&self) -> Result<CaptureSnapshot, CaptureSnapshotBuilderError>
Trait Implementations§
Source§impl Clone for CaptureSnapshotBuilder
impl Clone for CaptureSnapshotBuilder
Source§fn clone(&self) -> CaptureSnapshotBuilder
fn clone(&self) -> CaptureSnapshotBuilder
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 moreAuto Trait Implementations§
impl Freeze for CaptureSnapshotBuilder
impl RefUnwindSafe for CaptureSnapshotBuilder
impl Send for CaptureSnapshotBuilder
impl Sync for CaptureSnapshotBuilder
impl Unpin for CaptureSnapshotBuilder
impl UnsafeUnpin for CaptureSnapshotBuilder
impl UnwindSafe for CaptureSnapshotBuilder
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