openlegends_client/server/status/
error.rs

1use openlegends_server::api::server::*;
2use std::fmt::{Display, Formatter, Result};
3
4#[derive(Debug)]
5pub enum Error {
6    Connection(crate::connection::Error),
7    Response(status::response::Error),
8}
9
10impl Display for Error {
11    fn fmt(&self, f: &mut Formatter) -> Result {
12        match self {
13            Self::Connection(e) => {
14                write!(f, "Connection error: `{e}`")
15            }
16            Self::Response(e) => {
17                write!(f, "Response error: `{e}`")
18            }
19        }
20    }
21}