pub struct AsyncSCShareableContent;Expand description
Async wrapper for SCShareableContent
Provides async methods to retrieve displays, windows, and applications without blocking. Executor-agnostic - works with any async runtime.
Implementations§
Sourcepub fn get() -> AsyncShareableContentFuture ⓘ
pub fn get() -> AsyncShareableContentFuture ⓘ
Asynchronously get the shareable content (displays, windows, applications)
Uses callback-based Swift FFI for true async operation.
§Errors
Returns an error if:
- Screen recording permission is not granted
- The system fails to retrieve shareable content
Sourcepub fn create() -> AsyncSCShareableContentOptions
pub fn create() -> AsyncSCShareableContentOptions
Create options builder for customizing shareable content retrieval
Sourcepub fn current_process() -> AsyncShareableContentFuture ⓘ
pub fn current_process() -> AsyncShareableContentFuture ⓘ
Asynchronously get shareable content for the current process only (macOS 14.4+)
This retrieves content that the current process can capture without requiring user authorization via TCC (Transparency, Consent, and Control).
§Examples
use screencapturekit::async_api::AsyncSCShareableContent;
// Get content capturable without TCC authorization
let content = AsyncSCShareableContent::current_process().await?;
println!("Found {} windows for current process", content.windows().len());Trait Implementations§
Source§fn clone(&self) -> AsyncSCShareableContent
fn clone(&self) -> AsyncSCShareableContent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
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