WebPScreenshot

Struct WebPScreenshot 

Source
pub struct WebPScreenshot { /* private fields */ }
Expand description

Main entry point for screenshot capture

Implementations§

Source§

impl WebPScreenshot

Source

pub fn new() -> CaptureResult<Self>

Create a new WebPScreenshot instance with default configuration

Source

pub fn with_config(config: CaptureConfig) -> CaptureResult<Self>

Create a new instance with custom configuration

Source

pub fn get_displays(&self) -> CaptureResult<Vec<DisplayInfo>>

Get information about available displays

Source

pub fn capture_display( &mut self, display_index: usize, ) -> CaptureResult<Screenshot>

Capture a screenshot from a specific display

Source

pub fn capture_all_displays(&mut self) -> Vec<CaptureResult<Screenshot>>

Capture screenshots from all available displays

Source

pub fn capture_with_config( &mut self, display_index: usize, webp_config: WebPConfig, ) -> CaptureResult<Screenshot>

Capture with a custom encoder configuration

Source

pub fn create_streaming_pipeline(&self) -> StreamingPipelineBuilder

Create a streaming pipeline for continuous capture

Source

pub fn set_config(&mut self, config: CaptureConfig)

Set the capture configuration

Source

pub fn config(&self) -> &CaptureConfig

Get the current capture configuration

Source

pub fn stats(&self) -> &PerformanceStats

Get performance statistics

Source

pub fn reset_stats(&mut self)

Reset performance statistics

Source

pub fn memory_stats(&self) -> PoolStats

Get memory pool statistics

Source

pub fn zero_copy_stats(&self) -> Option<ZeroCopyStats>

Get zero-copy statistics

Source

pub fn implementation_name(&self) -> String

Get the implementation name

Source

pub fn is_hardware_accelerated(&self) -> bool

Check if hardware acceleration is available

Source

pub fn gpu_info(&self) -> Option<String>

Get GPU encoder information

Trait Implementations§

Source§

impl Default for WebPScreenshot

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.