pub struct CaptureScreenshotParamsBuilder<'a> { /* private fields */ }Implementations§
Source§impl<'a> CaptureScreenshotParamsBuilder<'a>
impl<'a> CaptureScreenshotParamsBuilder<'a>
Sourcepub fn format(self, format: impl Into<Cow<'a, str>>) -> Self
pub fn format(self, format: impl Into<Cow<'a, str>>) -> Self
Image compression format (defaults to png).
Sourcepub fn quality(self, quality: i64) -> Self
pub fn quality(self, quality: i64) -> Self
Compression quality from range [0..100] (jpeg only).
Sourcepub fn from_surface(self, from_surface: bool) -> Self
pub fn from_surface(self, from_surface: bool) -> Self
Capture the screenshot from the surface, rather than the view. Defaults to true.
Sourcepub fn capture_beyond_viewport(self, capture_beyond_viewport: bool) -> Self
pub fn capture_beyond_viewport(self, capture_beyond_viewport: bool) -> Self
Capture the screenshot beyond the viewport. Defaults to false.
Sourcepub fn optimize_for_speed(self, optimize_for_speed: bool) -> Self
pub fn optimize_for_speed(self, optimize_for_speed: bool) -> Self
Optimize image encoding for speed, not for resulting size (defaults to false)
pub fn build(self) -> CaptureScreenshotParams<'a>
Trait Implementations§
Source§impl<'a> Default for CaptureScreenshotParamsBuilder<'a>
impl<'a> Default for CaptureScreenshotParamsBuilder<'a>
Source§fn default() -> CaptureScreenshotParamsBuilder<'a>
fn default() -> CaptureScreenshotParamsBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for CaptureScreenshotParamsBuilder<'a>
impl<'a> RefUnwindSafe for CaptureScreenshotParamsBuilder<'a>
impl<'a> Send for CaptureScreenshotParamsBuilder<'a>
impl<'a> Sync for CaptureScreenshotParamsBuilder<'a>
impl<'a> Unpin for CaptureScreenshotParamsBuilder<'a>
impl<'a> UnsafeUnpin for CaptureScreenshotParamsBuilder<'a>
impl<'a> UnwindSafe for CaptureScreenshotParamsBuilder<'a>
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