timer_kit/error.rs
1//! Error types.
2
3/// Timeout elapsed error.
4#[derive(Debug)]
5pub struct Elapsed {
6 _sealed: (),
7}
8
9impl Elapsed {
10 pub(crate) fn new() -> Self {
11 Self { _sealed: () }
12 }
13}
14
15impl std::fmt::Display for Elapsed {
16 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
17 write!(f, "Timeout elapsed")
18 }
19}
20
21impl std::error::Error for Elapsed {}