Expand description
Error types for ScreenCaptureKit
This module provides comprehensive error types for all operations in the library.
All operations return SCResult<T> which is an alias for Result<T, SCError>.
§Examples
use screencapturekit::prelude::*;
fn setup_capture() -> SCResult<()> {
// Configure with builder pattern
let config = SCStreamConfiguration::new()
.with_width(1920)
.with_height(1080);
Ok(())
}
// Pattern matching on errors
match setup_capture() {
Ok(_) => println!("Success!"),
Err(SCError::InvalidDimension { field, value }) => {
eprintln!("Invalid {}: {}", field, value);
}
Err(e) => eprintln!("Error: {}", e),
}Enums§
- SCError
- Comprehensive error type for
ScreenCaptureKitoperations - SCStream
Error Code - Error codes from Apple’s
SCStreamError.Code
Constants§
- SC_
STREAM_ ERROR_ DOMAIN - Error domain for
ScreenCaptureKiterrors
Type Aliases§
- SCResult
- Result type alias for
ScreenCaptureKitoperations