naia_client_socket/
error.rs1use std::{error::Error, fmt};
2
3#[derive(Debug)]
6pub enum NaiaClientSocketError {
7 Message(String),
9 SendError,
11}
12
13impl fmt::Display for NaiaClientSocketError {
14 fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
15 match self {
16 NaiaClientSocketError::Message(msg) => write!(f, "Naia Client Socket Error: {}", msg),
17 NaiaClientSocketError::SendError => write!(f, "Naia Client Socket Send Error"),
18 }
19 }
20}
21
22impl Error for NaiaClientSocketError {}