mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
18 lines
340 B
Rust
18 lines
340 B
Rust
|
use common::net::PostError;
|
||
|
|
||
|
#[derive(Debug)]
|
||
|
pub enum Error {
|
||
|
Network(PostError),
|
||
|
ServerShutdown,
|
||
|
Other(String),
|
||
|
}
|
||
|
|
||
|
impl From<PostError> for Error {
|
||
|
fn from(err: PostError) -> Self {
|
||
|
match err {
|
||
|
PostError::Disconnected => Error::ServerShutdown,
|
||
|
err => Error::Network(err),
|
||
|
}
|
||
|
}
|
||
|
}
|