blob: 603caabcf1723c2f90623bdb8972967fdd830c70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
use common::error::NovaError;
#[derive(Debug)]
pub struct GatewayError(NovaError);
impl From<tokio_tungstenite::tungstenite::Error> for GatewayError {
fn from(e: tokio_tungstenite::tungstenite::Error) -> Self {
GatewayError {
0: NovaError {
message: e.to_string(),
},
}
}
}
impl From<String> for GatewayError {
fn from(e: String) -> Self {
GatewayError {
0: NovaError {
message: e,
},
}
}
}
|