camera_stream/error.rs
1/// Platform-specific error details.
2#[derive(Debug, thiserror::Error)]
3#[non_exhaustive]
4pub enum PlatformError {
5 #[error("{0}")]
6 Message(String),
7}
8
9/// Top-level crate error.
10#[derive(Debug, thiserror::Error)]
11#[non_exhaustive]
12pub enum Error {
13 #[error("no such device")]
14 DeviceNotFound,
15 #[error("unsupported format")]
16 UnsupportedFormat,
17 #[error("stream already started")]
18 AlreadyStarted,
19 #[error("stream not started")]
20 NotStarted,
21 #[error("platform error: {0}")]
22 Platform(#[from] PlatformError),
23}