udp_request/request/error/enum.rs
1/// An enumeration of possible errors that can occur during a UDP request.
2///
3/// This enum covers a range of potential issues, from socket creation to network timeouts.
4#[derive(Debug)]
5pub enum RequestError {
6 /// An error indicating that the provided URL is invalid.
7 InvalidUrl,
8 /// An error indicating that the UDP socket could not be created.
9 UdpSocketCreateError,
10 /// An error indicating that the UDP socket could not connect to the specified address.
11 UdpSocketConnectError,
12 /// A general request error, used for unspecified issues.
13 RequestError,
14 /// An error indicating that reading from the connection failed.
15 ReadConnectionError,
16 /// An error indicating that setting the read timeout for the socket failed.
17 SetReadTimeoutError,
18 /// An error indicating that setting the write timeout for the socket failed.
19 SetWriteTimeoutError,
20 /// An error indicating that reading the response from the socket failed.
21 ReadResponseError,
22 /// An error indicating that sending the request failed, with a descriptive message.
23 SendResponseError(String),
24}