pub struct CGImage { /* private fields */ }Expand description
CGImage wrapper for screenshots
Represents a Core Graphics image returned from screenshot capture.
§Examples
let content = SCShareableContent::get()?;
let display = &content.displays()[0];
let filter = SCContentFilter::builder().display(display).exclude_windows(&[]).build();
let config = SCStreamConfiguration::default();
let image = SCScreenshotManager::capture_image(&filter, &config)?;
println!("Screenshot size: {}x{}", image.width(), image.height());Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CGImage
impl RefUnwindSafe for CGImage
impl Unpin for CGImage
impl UnwindSafe for CGImage
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