pub struct SCDisplay(/* private fields */);Expand description
Opaque wrapper around SCDisplay from ScreenCaptureKit
Represents a physical or virtual display that can be captured.
§Examples
use screencapturekit::shareable_content::SCShareableContent;
let content = SCShareableContent::get()?;
for display in content.displays() {
println!("Display {}: {}x{}",
display.display_id(),
display.width(),
display.height()
);
}Implementations§
Source§impl SCDisplay
impl SCDisplay
Sourcepub fn display_id(&self) -> u32
pub fn display_id(&self) -> u32
Get display ID
§Examples
let content = SCShareableContent::get()?;
if let Some(display) = content.displays().first() {
println!("Display ID: {}", display.display_id());
}Trait Implementations§
impl Eq for SCDisplay
impl Send for SCDisplay
impl Sync for SCDisplay
Auto Trait Implementations§
impl Freeze for SCDisplay
impl RefUnwindSafe for SCDisplay
impl Unpin for SCDisplay
impl UnwindSafe for SCDisplay
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