veloren/client/src/error.rs

19 lines
357 B
Rust
Raw Normal View History

use common::net::PostError;
#[derive(Debug)]
pub enum Error {
Network(PostError),
ServerTimeout,
ServerShutdown,
Other(String),
}
impl From<PostError> for Error {
fn from(err: PostError) -> Self {
match err {
PostError::Disconnect => Error::ServerShutdown,
err => Error::Network(err),
}
}
}