mini_http_test/
error.rs

1use std::{io, time::Duration};
2
3use thiserror::Error as ThisError;
4
5#[derive(Debug, ThisError)]
6pub enum Error {
7    #[error("bind TCP listener: {0}")]
8    BindTCPListener(io::Error),
9    #[error("get TCP listener socket address: {0}")]
10    GetTCPListenerAddress(io::Error),
11    #[error("req_count did not reach {target_count} within {timeout:?} (current count: {current_count})")]
12    AwaitReqCountTimeout {
13        current_count: u64,
14        target_count: u64,
15        timeout: Duration,
16    },
17    #[error("concurrent_req_count did not reach {target_count} within {timeout:?} (current count: {current_count})")]
18    AwaitConcurrentReqCountTimeout {
19        current_count: u64,
20        target_count: u64,
21        timeout: Duration,
22    },
23}