1use std::time::Duration;
2
3use thiserror::Error;
4
5#[derive(Debug, Error)]
6pub enum PinrayError {
7 #[error("invalid session configuration: {0}")]
8 InvalidConfig(String),
9 #[error("backend unavailable: {0}")]
10 BackendUnavailable(String),
11 #[error("capture backend not selected")]
12 BackendNotSelected,
13 #[error("capture timed out after {0:?}")]
14 Timeout(Duration),
15 #[error("operation not supported: {0}")]
16 Unsupported(String),
17 #[error("platform error: {0}")]
18 Platform(String),
19}
20
21pub type Result<T> = std::result::Result<T, PinrayError>;