Module async_api

Module async_api 

Source
Expand description

Async API for ScreenCaptureKit

This module provides async versions of operations when the async feature is enabled. The async API is executor-agnostic and works with any async runtime (Tokio, async-std, smol, etc.).

§Runtime Agnostic Design

This async API uses only std types and works with any async runtime:

  • Uses callback-based Swift FFI for true async operations
  • Uses std::sync::{Arc, Mutex} for synchronization
  • Uses std::task::{Poll, Waker} for async primitives
  • Uses std::future::Future trait

§Examples

use screencapturekit::async_api::AsyncSCShareableContent;

let content = AsyncSCShareableContent::get().await?;
println!("Found {} displays", content.displays().len());

Structs§

AsyncSCScreenshotManager
Async wrapper for SCScreenshotManager
AsyncSCShareableContent
Async wrapper for SCShareableContent
AsyncSCShareableContentOptions
Options for async shareable content retrieval
AsyncSCStream
Async wrapper for SCStream with integrated frame iteration
AsyncScreenshotFuture
Future for async screenshot capture
AsyncShareableContentFuture
Future for async shareable content retrieval
NextSample
Future for getting the next sample buffer