#[repr(C)]pub struct ScreenCaptureConfig {
pub source: ScreenCaptureSource,
pub fps: u32,
pub output_format: RawImageFormat,
}Expand description
Requested screen-capture configuration — the input to the screencap
widget. Zero fps means “let the backend pick its default”.
Fields§
§source: ScreenCaptureSourceWhat to capture (display / window).
fps: u32Preferred frame rate (0 = backend default).
output_format: RawImageFormatTexture format the backend should deliver. BGRA8 is the portable
default; Nv12 (a later RawImageFormat addition) is the zero-copy
path on platforms that produce it natively.
Implementations§
Source§impl ScreenCaptureConfig
impl ScreenCaptureConfig
Sourcepub fn new(source: ScreenCaptureSource) -> Self
pub fn new(source: ScreenCaptureSource) -> Self
A default config for the given source (backend-chosen fps, BGRA8).
Trait Implementations§
Source§impl Clone for ScreenCaptureConfig
impl Clone for ScreenCaptureConfig
Source§fn clone(&self) -> ScreenCaptureConfig
fn clone(&self) -> ScreenCaptureConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ScreenCaptureConfig
impl Debug for ScreenCaptureConfig
Source§impl Default for ScreenCaptureConfig
impl Default for ScreenCaptureConfig
Source§impl PartialEq for ScreenCaptureConfig
impl PartialEq for ScreenCaptureConfig
Source§fn eq(&self, other: &ScreenCaptureConfig) -> bool
fn eq(&self, other: &ScreenCaptureConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ScreenCaptureConfig
impl StructuralPartialEq for ScreenCaptureConfig
Auto Trait Implementations§
impl Freeze for ScreenCaptureConfig
impl RefUnwindSafe for ScreenCaptureConfig
impl Send for ScreenCaptureConfig
impl Sync for ScreenCaptureConfig
impl Unpin for ScreenCaptureConfig
impl UnsafeUnpin for ScreenCaptureConfig
impl UnwindSafe for ScreenCaptureConfig
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