pub enum CaptureError {
DisplayNotFound(usize),
DisplayEnumerationFailed(String),
CaptureFailed(String),
PermissionDenied(String),
PlatformError(String),
HardwareAccelerationUnavailable(String),
InvalidConfiguration(String),
MemoryAllocationFailed {
size: usize,
},
CaptureTimeout {
timeout_ms: u64,
},
IoError(Error),
EncodingError(String),
Other(Error),
}Expand description
Main error type for screenshot capture operations
Variants§
DisplayNotFound(usize)
Display not found or invalid index
DisplayEnumerationFailed(String)
Display enumeration failed
CaptureFailed(String)
Capture operation failed
PermissionDenied(String)
Permission denied for screen capture
PlatformError(String)
Platform-specific error
Hardware acceleration not available
InvalidConfiguration(String)
Invalid configuration
MemoryAllocationFailed
Memory allocation failed
CaptureTimeout
Timeout occurred during capture
IoError(Error)
IO error
EncodingError(String)
Encoding error
Other(Error)
Other errors
Implementations§
Source§impl CaptureError
impl CaptureError
Sourcepub fn is_recoverable(&self) -> bool
pub fn is_recoverable(&self) -> bool
Check if the error is recoverable (worth retrying)
Sourcepub fn to_error_code(&self) -> i32
pub fn to_error_code(&self) -> i32
Get error code for FFI
Trait Implementations§
Source§impl Debug for CaptureError
impl Debug for CaptureError
Source§impl Display for CaptureError
impl Display for CaptureError
Source§impl Error for CaptureError
impl Error for CaptureError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<EncodingError> for CaptureError
impl From<EncodingError> for CaptureError
Source§fn from(err: EncodingError) -> Self
fn from(err: EncodingError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for CaptureError
impl From<Error> for CaptureError
Auto Trait Implementations§
impl Freeze for CaptureError
impl !RefUnwindSafe for CaptureError
impl Send for CaptureError
impl Sync for CaptureError
impl Unpin for CaptureError
impl !UnwindSafe for CaptureError
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