VecCapturer

Type Alias VecCapturer 

Source
pub type VecCapturer = Capturer<Vec<u8>>;
Expand description

Capture screen to a Vec<u8>.

§Examples

use rusty_duplication::{Scanner, VecCapturer};

let monitor = Scanner::new().unwrap().next().unwrap();
let mut capturer: VecCapturer = monitor.try_into().unwrap();

Aliased Type§

pub struct VecCapturer {
    pub pointer_shape_buffer: Vec<u8>,
    pub buffer: Vec<u8>,
    pub timeout_ms: u32,
    /* private fields */
}

Fields§

§pointer_shape_buffer: Vec<u8>§buffer: Vec<u8>

The buffer to store the captured frame. The data is stored in BGRA32 format.

§timeout_ms: u32

Timeout in milliseconds for the next frame. By default it is 300ms.

Trait Implementations§

Source§

impl TryFrom<Monitor> for VecCapturer

Source§

type Error = Error

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

fn try_from(monitor: Monitor) -> Result<Self>

Performs the conversion.