1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
3pub enum WaitError {
4 TimedOut,
6 Interrupted,
8 OsError(u32),
10 Unsupported,
12}
13
14#[cfg(feature = "std")]
15impl std::fmt::Display for WaitError {
16 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17 match self {
18 Self::TimedOut => write!(f, "timed out"),
19 Self::Interrupted => write!(f, "interrupted"),
20 Self::OsError(code) => write!(f, "os error: {code}"),
21 Self::Unsupported => write!(f, "unsupported platform"),
22 }
23 }
24}
25
26#[cfg(feature = "std")]
27impl std::error::Error for WaitError {}