1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::{error::Error, fmt};

#[derive(Debug)]
pub enum NaiaServerError {
    Wrapped(Box<dyn Error>),
}

impl fmt::Display for NaiaServerError {
    fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
        match self {
            NaiaServerError::Wrapped(boxed_err) => fmt::Display::fmt(boxed_err.as_ref(), f),
        }
    }
}

impl Error for NaiaServerError {}
unsafe impl Send for NaiaServerError {}
unsafe impl Sync for NaiaServerError {}